N
Nuxt9mo ago
kormizz

Custom key names while building cache key or excluding query params

During caching, we need to exclude some query parameters simply because of the overall cache size. It is unnecessary to store a key for each tracking ID referenced in the URL. I am considering two ways to accomplish this: 1. Building our own cache key using the routeRules.getKey callback, grouping all the requests into one key without the unwanted query parameters. 2. Excluding the unwanted query parameters before the cache key is built. The first option is not possible since getKey has been removed in Nuxt due to serialisation purposes. The second option probably requires some new implementation, but I'm unsure how to proceed. I would prefer to use the first option, but I understand that achieving it could be tricky. There are certainly reasons why Nuxt is removing it! (https://github.com/nuxt/nuxt/issues/23139) Any help would be appreciated!
GitHub
niro > routeRules > cache > getKey lost in the process of delivery ...
Environment Operating System: Linux Node Version: v16.20.0 Nuxt Version: 3.7.0 CLI Version: 3.7.2 Nitro Version: 2.6.2 Package Manager: [email protected] Builder: - User Config: nitro Runtime Modules: - Bu...
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server