Clear system cache
POST
https://app.speybooks.com/api/v1/admin/system/clear-cacheFlush all server-side in-memory caches. Clears both the main application cache (fastify.cache) and the tenant cache (fastify.tenantCache) if they exist.
Returns the number of keys cleared (from the main cache stats, if available).
Use Cases
- After manual database edits
- After system setting changes that affect cached data
- During incident response
Side Effects
- Writes
CACHE_CLEAREDtoadmin_audit_log - Subsequent requests will incur cache-miss latency until the cache warms up
Response
200 All in-memory caches flushed. Returns number of keys cleared.
Show response fields
keysCleared integermessage stringError codes
400 Cache flush failed.