response-caching
Skill0 starsChanged 7 months agoMITView on GitHub
Custom strategies configurable via YAML.
In this repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- audit-trailSkill
- authSkill
- fan-outSkill
- observabilitySkill
- rate-limitingSkill
- schema-validationSkill
- tool-allowlistSkill
The file
Files
Response Caching
Capability
Redis and in-memory LRU response caching with configurable TTL, per-tool cache strategies, and cache bypass.
Package
@reaatech/mcp-gateway-cache — packages/cache/src/
Components
| Component | Purpose |
cache-manager.ts | CacheManager orchestrator: get, set, delete, clear, shouldBypass |
memory-cache.ts | LRU in-memory cache with configurable max entries |
redis-cache.ts | Redis-backed cache with TTL-based expiration |
cache-strategies.ts | Per-tool cache configuration with pattern matching |
cache.middleware.ts | Express middleware for cache intercept |
Cache Key Generation
cache_key = SHA-256(tenant_id + method + JSON(params))Cache Strategies
Built-in defaults (DEFAULT_CACHE_STRATEGIES):
glean_search,serval_query→ 60s TTL*_static,*_readonly→ 3600s TTL
Custom strategies configurable via YAML.
Cache Headers
| Header | Description |
X-Cache | HIT or MISS |
X-Cache-TTL | Remaining TTL in seconds |
X-Cache-Key | Cache key used (for debugging) |
Error Handling
- Cache misses continue to upstream transparently
- Redis failures fail-open (continue to upstream)
- Cache bypass via
Cache-Control: no-cacheheader
Security Considerations
- Cache keys include tenant_id (prevent cross-tenant pollution)
- Cache entries not shared across tenants
- TTL bounds enforced (min 1s, max 24h)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

