You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it doesn't use any api and depends on implementation detail (handlers and cachedEventHandler aren't in scope in my plugin but are in scope in the compiled node-server.mjs), but it would be acceptable to me.
I am close to commenting that out in the compiled code via sed, but I figured I would open a feature request here first :D
I can't think of a nice api to make my plugin code nicer right now, since I don't have the handler cause it gets created by nuxt, but I would already be happy if cache.ts could be adjusted to not override getKey methods from the outside.
open to other ideas tho, I am willing to help brainstorming (I am MiniDigger#3086 on discord if that helps) and even implement this (haven't touched nitro code before but seems straight forward), my company allows me to work/contribute on this problem on work time.
Additional information
Would you be willing to help implement this feature?
The text was updated successfully, but these errors were encountered:
Describe the feature
I want to use a custom cache key for my route cache (coming from nuxt but open to implementing a nitro plugin).
Naive me thought I could just pass it like this in my nitro (well, nuxt) config:
that doesn't work because nitro can't serialize my method. fair enough.
my next try is a lot more ugly, but I basically did this as a nitro plugin:
it doesn't use any api and depends on implementation detail (handlers and cachedEventHandler aren't in scope in my plugin but are in scope in the compiled node-server.mjs), but it would be acceptable to me.
sadly not even that works, because the getKey method in my options object is overriden here: https://github.com/unjs/nitro/blob/main/src/runtime/cache.ts#L120
I am close to commenting that out in the compiled code via sed, but I figured I would open a feature request here first :D
I can't think of a nice api to make my plugin code nicer right now, since I don't have the handler cause it gets created by nuxt, but I would already be happy if cache.ts could be adjusted to not override getKey methods from the outside.
open to other ideas tho, I am willing to help brainstorming (I am MiniDigger#3086 on discord if that helps) and even implement this (haven't touched nitro code before but seems straight forward), my company allows me to work/contribute on this problem on work time.
Additional information
The text was updated successfully, but these errors were encountered: