We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I read the issue #977 . But I find getKey still invalid in routeRules > cache, in nitro.config.js here is my config
nitro: { devStorage: { 'v_pc': { driver: 'redis', /* redis connector options */ port: 6379, // Redis port host: 'localhost', // Redis host db: 0, // Defaults to 0 maxRetriesPerRequest: 2, }, }, routeRules: { '/**': { cache: { name: 'my_name', swr: false, maxAge: 6 * 60, base: 'v_pc', getKey: () => 'hhhiii', }, }, }, },
I console.log in here (in route-rules.mjs file),
const config = useRuntimeConfig(); console.log('config.nitro.routeRules', config.nitro.routeRules) const _routeRulesMatcher = toRouteMatcher( createRadixRouter({ routes: config.nitro.routeRules }) );
getKey is lost
config.nitro.routeRules { '/__nuxt_error': { cache: false }, '/**': { cache: { name: 'my_name', swr: false, maxAge: 360, base: 'v_pc' } } }
I guess this is a bug. getKey is lost In the process of delivery.
### Tasks - [ ] https://github.com/unjs/nitro/issues/977
The text was updated successfully, but these errors were encountered:
Thanks for detailed issue dear @William-WFC but would you please also attach a minimal reproduction?
Sorry, something went wrong.
here is reproduction.
https://stackblitz.com/edit/nuxt-starter-v6wnbq?file=nuxt.config.ts,app.vue
the cache file in .nuxt/cache/nitro/routes/my_test should be hhhiii.json, as configured in nuxt.config.ts. but actually it's index.il7asoJjJE.json
Is there any answer?
I think this is a duplicate of #1048
Let's track with #1048
non serializable values in route rules such as functions cannot be passed from config to runtime.
No branches or pull requests
I read the issue #977 .
But I find getKey still invalid in routeRules > cache, in nitro.config.js
here is my config
I console.log in here (in route-rules.mjs file),
getKey is lost
I guess this is a bug. getKey is lost In the process of delivery.
The text was updated successfully, but these errors were encountered: