Multi-Tier Caching
Quint uses a two-tier caching system to avoid re-scoring identical events. Events are hashed by their essential fields (action, target, data fields, agent type) to produce a signature. If the same signature has been scored before, the cached result is returned instantly.Architecture
Signature Hashing
The cache signature is computed from event essentials — fields that determine the score outcome:event_id(unique per event)timestamp(temporal modifier uses baseline, not absolute time)session_id(session context is separate)
Cache Tiers
L1: Redis
| Setting | Default | Description |
|---|---|---|
| TTL | 86,400 seconds (24h) | How long cached scores persist |
| Max per customer | 10,000 | Maximum cached events per customer |
L2: PostgreSQL
| Setting | Default | Description |
|---|---|---|
| TTL | 7 days | How long cached scores persist |
event_cache table with a unique constraint on (customer_id, signature_hash).
Cache Manager API
Cache Hit Rate
Thecache_hit field in score responses indicates whether a cached result was used:
- High repetition workloads (CI/CD bots, monitoring agents): 60-80% hit rate
- Diverse workloads (user-facing agents, varied tasks): 20-40% hit rate