Response Caching

Two-Tier Cache.
Sub-Millisecond Hits.

Multi-tier caching for instant response times. Cache hits never reach your backend, reducing load and latency. Early cache middleware serves responses before the proxy pipeline even starts.

Cache Lookup Flow

GET /api/products

Early Cache Middleware

Checks cache BEFORE auth, transforms, or proxy

~0.1ms

In-Memory Cache

Instant access for frequently requested responses.

Fastest

Distributed Cache

Shared across all instances. Configurable TTL per route.

~0.1ms

Cache MISS → Proxy to Backend

Response cached on return (fire-and-forget write)

Engineered for Performance

Every detail optimized for maximum cache hit rate and minimum latency.

Optimized Cache Keys

Fast, collision-resistant cache key generation for URL patterns. Order-independent query string hashing.

Smart Query Normalization

?a=1&b=2 and ?b=2&a=1 produce the same cache key automatically.

Security Header Filtering

Sensitive headers (Authorization, Cookie, Set-Cookie) are automatically stripped before caching.

Fail-Open Design

Cache failures never block requests. Cache writes are fire-and-forget. Your API stays fast even if cache is unavailable.

Config Version Keys

Cache keys include a config version. Route changes automatically invalidate stale cache entries without manual purging.

Instant Cache Invalidation

Cache invalidation propagates instantly across all nodes. Update a route on one node, cache clears everywhere.

The Early Cache Advantage

Most gateways check the cache after authentication and transformation. Nolxy checks it first. On a cache HIT:

  • Authentication is still verified (security first)
  • Route matching is done once and reused downstream
  • Request transforms are SKIPPED entirely
  • Proxy call is SKIPPED entirely
  • Response is sent directly from memory
  • gatewayContext is pre-populated for cache MISSes (no duplicate DB lookups)

Cache Smarter, Not Harder

Response caching is available on all plans. Configure TTL per route, and Nolxy handles the rest.