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
Multi-platform support (Node, Bun, Deno, Cloudflare, etc.)
Why This Matters
Framework Completeness: Modern frameworks like Next.js, Nuxt, and Astro include robust caching solutions. Hono needs equivalent capabilities to be considered production-ready for full-stack applications.
Developer Experience: Reduce boilerplate for common caching patterns:
// Current workaroundletdataif(awaitcache.exists(key)){data=awaitcache.get(key)}else{data=normalDataRetriving()awaitcache.set(key,data)}
Performance Critical
Proper caching is essential for:
API response caching
SSR/SSG optimizations
Reducing expensive operations/API calls
Platform Agnosticism
Aligns with Hono's core philosophy of universal compatibility across runtimes.
@yusukebe@sor4chi
Would you please give your thoughts on this.
I am willing to implement it.
I have a basic implementation that I developed in our startup and maybe with your help, we can make it public.
However, I don't want to add more logic depending on each runtime to this honojs/hono. That will increase the package size and maintenance costs. It will be okay to provide a super thin API or a TypeScript interface. For example, make Cache Middleware so that the user can replace the cache method instead of Cache API's.
I am not sure i fully understand your idea. Could you provide for e.g a pseudo-code implementation so we can be on the same level.
also, we can do it on their middleware repo so it can be installed when needed.
What is the feature you are proposing?
Problem
Hono's current cache middleware implementation has two key limitations:
This forces developers to:
Proposal: Universal Cache Middleware
Implement a flexible caching system inspired by Nitro's cache implementation with:
Storage Adapter Interface
Support pluggable adapters for:
Unified Configuration
Core Features
Why This Matters
Performance Critical
Proper caching is essential for:
Aligns with Hono's core philosophy of universal compatibility across runtimes.
Implementation Considerations
Storage Adapter Interface Proposal
Priority Adapters
Other considerations:
The text was updated successfully, but these errors were encountered: