SptDB: Cached Query
Demonstrates a query cache layer with TTL that achieves up to 2000x speedup for repeated queries.
Source: examples/sptdb/cached-query.js
Usage
bash
node examples/sptdb/cached-query.js "security patterns" my-namespaceWhat It Does
- Runs a query against SptDB
- Caches the result with a configurable TTL
- On subsequent identical queries, returns the cached result instantly
- Reports cache hit/miss statistics