Add example(s) with external stores?
See original GitHub issueI would love to get this working for my case, but I find the following part of the readme extremely cryptic:
You can store the session content in external stores (Redis, MongoDB or other DBs) by passing options.store with three methods (these need to be async functions):
get(key, maxAge, { rolling }): get session object by key set(key, sess, maxAge, { rolling, changed }): set session object for key, with a maxAge (in ms) destroy(key): destroy session for key
- How to pass “options.store with three methods”?
- On the
set
method, what is thesess
parameter?
Would anyone be kind enough to add an example of the above (especially using redis)? I searched everywhere and it is still a mystery to me how to get it working…
Thanks!! Daniel
Issue Analytics
- State:
- Created 5 years ago
- Reactions:6
- Comments:7 (4 by maintainers)
Top Results From Across the Web
What is external storage device? | Definition from TechTarget
External storage enables users to store data separately from a computer's main or primary storage and memory at a relatively low cost. It...
Read more >External Storage in Android with Example - GeeksforGeeks
In this example, we would store text data into the external storage and fetch to see that data. A sample GIF is given...
Read more >Connect and use other storage devices with Mac
Learn how to connect and use external hard drives, thumb drives, and other storage devices with your Mac.
Read more >Add a column from an example (Power Query)
Add a column from all columns To open a query, locate one previously loaded from the Power Query Editor, select a cell in...
Read more >ALTER EXTERNAL TABLE examples - Amazon Redshift
The following example sets the numRows table property for the SPECTRUM. SALES external table to 170,000 rows.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Maybe you can check out this module as an example.
https://github.com/eggjs/egg-session-redis/blob/master/app.js#L12
@danrocha I got the same error with store get, set function finally, I change to use koa-session2 and ioredis maybe you should check out this issues https://github.com/Secbone/koa-session2/issues/39