Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data is not cached #23

Open
anchalkhandelwal opened this issue Sep 24, 2020 · 0 comments
Open

Data is not cached #23

anchalkhandelwal opened this issue Sep 24, 2020 · 0 comments

Comments

@anchalkhandelwal
Copy link

I am using this with express session 'express-session-cache-manager' . My current code is:
`
var cacheManager = require('cache-manager')
var CacheManagerStore = require('express-session-cache-manager').default

var fsStore = require('cache-manager-fs');

var diskCache = cacheManager.caching({
store: fsStore,
options:
{ttl: 606024/* seconds /,
maxsize: 1000
10001000 / max size in bytes on disk */,
path:'diskcache',
preventfill:false,
}});

const sessionMiddleware = session({
store: new CacheManagerStore(diskCache),
secret: APP_SECRET,
resave: true,
saveUninitialized: true,
cookie: { maxAge: 2419200000}
})

app.use(sessionMiddleware)
`
This creates multiple cache files on each call.
What am i missing here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant