Skip to content

Adapters

@express-route-cache is adapter-agnostic. You can swap storage engines depending on your production environment.

Available Adapters

AdapterBest ForRequirement
MemoryLocal dev / Single-instanceNone (Built-in)
RedisProduction / Distributedioredis
MemcachedProduction / Distributedmemjs

Which one should I choose?

  • Use Memory if you are running a single Node.js process and don't need the cache to persist between restarts.
  • Use Redis (Recommended) for most production apps. it allows multiple server instances to share the same cache and is extremely fast.
  • Use Memcached if your infrastructure already uses it or if you only need simple key-value caching without complex data structures.

Creating a Custom Adapter

You can build your own adapter by implementing the CacheClient interface. See the API Reference for details.

Released under the MIT License.