question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add example(s) with external stores?

See original GitHub issue

I 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 the sess 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:open
  • Created 5 years ago
  • Reactions:6
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
dead-horsecommented, Oct 23, 2018

Maybe you can check out this module as an example.

https://github.com/eggjs/egg-session-redis/blob/master/app.js#L12

1reaction
Beats0commented, Oct 28, 2018

@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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found