How sherlock-hashed/kshama works
This is a CLI-configured HTTP caching reverse proxy. Operators supply the origin and cache settings; clients send requests to the Express server, which forwards non-GET requests and serves GETs from an in-memory LRU+TTL cache when possible, otherwise fetching and caching the origin response. Admin routes expose statistics and clear the cache, while logging records proxy activity. README capabilities are included where documented; runtime flows are based on the sampled entry point, server, cache, and logger sources.
Main entry points: server.js Proxy Server · index.js CLI Configuration · CacheService.js LRU TTL Cache · logger.js Console Logger
Components 7
Startup & Configuration
- CLI Configuration
src/index.js
Proxy Runtime
- Proxy Server
src/server.js
Cache & Observability
- LRU TTL Cache
src/cache/CacheService.js - Console Logger
src/utils/logger.js
Other components
- Operator
- HTTP Client
- Origin API
Connections 13
- Operator → CLI Configuration: configures
- CLI Configuration → Proxy Server: starts
- Operator → CLI Configuration: requests clear
- CLI Configuration → Proxy Server: DELETE request
- HTTP Client → Proxy Server: HTTP request
- Proxy Server → LRU TTL Cache: checks GET
- LRU TTL Cache → Proxy Server: returns entry
- Proxy Server → Origin API: fetches on miss
- Proxy Server → Origin API: forwards non-GET
- Proxy Server → LRU TTL Cache: stores miss response
- Proxy Server → LRU TTL Cache: reads stats / clears
- Proxy Server → Console Logger: logs operations
- CLI Configuration → Console Logger: logs CLI events