Open issue-up[bot] opened 1 year ago
Maybe related to #1198
I've upgraded the bug's demo to Nuxt 3.7 and Nitro 2.6, and the issue still persists.
I've upgraded the bug's demo to Nuxt 3.7 and Nitro 2.6, and the issue still persists.
i have the same issue, did you manage to solve this problem?
@dimasxp We followed the approach of this PR and patched the Cloudflare kv driver of unstorage ourselves so that our cache uses the native Cloudflare expiration mechanism.
This is also an issue with the cloudflare-module
preset when utilizing Cloudflare KV as the cache
driver.
No ttl
or expires
is written to the KV entry, meaning it does not expire and lives eternally.
### Environment - Operating System: `Darwin` - Node Version: `v20.4.0` - Nuxt Version: `3.6.5` - Nitro Version: `2.5.2` - Package Manager: `yarn@3.6.1` - Builder: `vite` - User Config: `devtools`, `nitro`, `routeRules` - Runtime Modules: `-` - Build Modules: `-` ### Reproduction source code: https://github.com/DanSnow/nuxt-cache-test demo: https://nuxt-cache-test.pages.dev ### Describe the bug ### Cache Configuration - API: Use defineCachedEventHandler with the settings `swr: true` and `maxAge: 1`. https://github.com/DanSnow/nuxt-cache-test/blob/main/server/api/time.ts - Route Rule: All use the settings `swr: true`, `maxAge: 10`, and `staleMaxAge: 3`. https://github.com/DanSnow/nuxt-cache-test/blob/main/nuxt.config.ts#L12 ### Expected Behavior The time difference between the server and the client should be at most around 10 seconds. ### Actual Behavior As shown in the video, the server's time remains unchanged. https://github.com/nuxt/nuxt/assets/5575082/99c02dd2-287e-4d1a-8a25-51da24c60024 ### Additional context _No response_ ### Logs _No response_