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

The tdb value in .next-boost.js config is ignored for the default adapter. #61

Open
bfarrell-chwy opened this issue Jan 5, 2022 · 0 comments

Comments

@bfarrell-chwy
Copy link

bfarrell-chwy commented Jan 5, 2022

Description

The the tdb value is ignored in .next-boost.js

We are using the following configuration for our .next-boost.js file

module.exports = {
  cache: {
    ttl: 60,
    tbd: 60 * 2,
  },

Expected behavior
Cache manager inited, will start to purge in 120s

Actual Behavior
Cache manager inited, will start to purge in 3600s

Notes

What we have observed is that the tbd value is ignored, and instead it uses the default value or 1 hour. We have been able to work around this by utilizing the ability to set a custom adapter, but still use the hybrid-disk-cache.

I haven't been able to 100% confirm it but I believe the following line of code is the problem. As I don't believe the configuration values are being passed as a parameter into the init() function.

See -

const cache = await adapter.init()

  const cache = await adapter.init()

And it should be

const cache = await adapter.init(conf)
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