Skip to content

Cache Inspector

The Cache Inspector shows cache statistics when a CacheBridge is attached to the Studio context. If caching is off, it reports enabled: false.

  1. Open Studio (mountsqli dev) with caching configured.
  2. Go to the Cache view.
Metric Meaning
Hits / Misses how often cached results were reused
Evictions entries removed by the eviction policy
Size current entry count
Tags which tags are present

The inspector reads from a CacheBridge passed to makeStudioContext. In the CLI dev server, this is wired when your config includes a cache section.

import { makeStudioContext } from "@mountsqli/studio";
const ctx = makeStudioContext(db, cacheBridge);
  • Watch hit rate to confirm your cache keys are stable.
  • Use tags to verify invalidation fires on writes.
  • Opening the view without a cache configured — it shows enabled: false.
  • Reading size as a health signal without hit rate context.