Skip to content
New issue

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

Allow overriding the built-in cache handler #3102

Closed
1 task done
cjpearson opened this issue Feb 18, 2025 · 1 comment
Closed
1 task done

Allow overriding the built-in cache handler #3102

cjpearson opened this issue Feb 18, 2025 · 1 comment

Comments

@cjpearson
Copy link
Contributor

cjpearson commented Feb 18, 2025

Describe the feature

Based on this comment

Adding a cacheHandler option to the nitro config would allow applications and modules to customize the caching behavior of nitro.

I'm thinking one approach could be to mimic the behavior of errorHandler. (But not allowing an array) Here the cache handler could be imported from #nitro-internal-virtual/cache-handler instead which would resolve to the configured handler if provided, or fallback to the default one.

https://nitro.build/config#errorhandler

Additional information

  • Would you be willing to help implement this feature?
@pi0
Copy link
Member

pi0 commented Feb 18, 2025

An (auto) import with a different name can be used for any different implementation.

Changing built-in behavior implicitly by option is not a really good idea (error handler is really different story).

@pi0 pi0 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants