kormizz
kormizz
NNuxt
Created by kormizz on 3/27/2024 in #❓・help
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!
1 replies