Skip to main content

Cache management

The Cache page gives operators a tenant-scoped view of CRUD response caches so you can keep long-lived environments tidy and avoid stale reads during development.

Cache management table with purge controls

For terminal-driven work, the matching CLI is yarn saasframe configs cache. It covers the same segment stats/purge path as the admin page and adds targeted purge modes for tags, exact keys, identifier tokens, patterns, and structural navigation cleanup.

Access

  • Navigate to Backend → Configuration → Cache.
  • Access requires the configs.cache.view feature. Purge controls unlock only if you also hold configs.cache.manage.

Reading cache statistics

  • The summary card shows when metrics were generated and how many keys are currently stored for the active tenant.
  • Each table row represents a cache segment. When the system can map the segment back to an API route you see the HTTP method and path alongside the internal key.
  • Use the Refresh button any time you suspect another operator or automation invalidated cache entries.

Clearing segments

  • Purge selected buttons clear only the highlighted segment and immediately refresh statistics so you can monitor the impact.
  • Purge all clears every cached entry for the active tenant after a confirmation prompt. The action runs through the shared /api/configs/cache endpoint and respects the underlying cache backend (Redis, SQLite, etc.).
  • If the cache backend does not support an operation, the UI surfaces a descriptive error and leaves the existing entries untouched.

CLI alternative

Use the CLI when you need repeatable or cross-tenant cleanup:

# same segment view as the page
yarn saasframe configs cache stats --tenant <tenantId>

# clear one segment
yarn saasframe configs cache purge --segment admin-nav --tenant <tenantId>

# clear navigation cache after structural app changes
yarn saasframe configs cache structural --all-tenants

For internals, see the cache CLI architecture.