Skip to main content
Caching is always on. Eval and enrichment results are stored to disk after each run and served instantly on subsequent views - no re-execution needed.

How it works

When you open a session:
  1. For each registered eval and enrichment, Claudeye checks the cache
  2. If a valid cached result exists, it’s served immediately
  3. If no cache entry exists (or it’s been invalidated), the function runs and the result is stored
The cache is stored at ~/.claudeye/cache/ by default.

Automatic invalidation

Cached results are automatically invalidated when:
  • The session file changes - new content in the JSONL log produces a different contentHash
  • You edit the eval or enrichment function - a different itemCodeHash (SHA-256 of fn.toString()) invalidates only that item’s cache
Other items in the same session are unaffected when a single eval function changes.

Manual cache control

Re-run button - click Re-run next to any eval or enrichment in the dashboard to bypass the cache for that item. Re-run All - reruns all evals and enrichments for the session, clearing their cached results first. CLI:
# Clear all cached results and exit
claudeye --cache-clear

# Use a custom cache directory
claudeye --cache-path /tmp/claudeye-cache

Custom invalidation with app.cacheInvalidation()

Register a hook to add your own invalidation logic. If the hook returns true, the cached entry is discarded and the item re-runs.
app.cacheInvalidation((ctx) => boolean | Promise<boolean>);
The hook runs before serving any cached eval or enrichment result. It does not affect actions, alerts, or conditions.

Hook context

FieldDescription
itemNameEval or enrichment name
itemKind"evals" or "enrichments"
cachedAtISO timestamp of when the result was cached
cachedValueThe full cached result object
projectNameProject name
sessionIdSession ID
contentHashHash of the session file content
itemCodeHashHash of the eval/enrichment function code
Only the last call to app.cacheInvalidation() is active. Combine all your invalidation logic into a single hook using if-statements.

Examples

// Combine multiple conditions into one hook
app.cacheInvalidation((ctx) => {
  const ageMs = Date.now() - new Date(ctx.cachedAt).getTime();
  const twentyFourHours = 24 * 60 * 60 * 1000;

  // Time-based: discard any cached entry older than 24 hours
  if (ageMs > twentyFourHours) return true;

  // Value-based: re-run any eval that scored 0
  if (ctx.itemKind === 'evals' && ctx.cachedValue?.score === 0) return true;

  // Compound: re-run enrichments older than 1h in a specific project
  if (
    ctx.itemKind === 'enrichments' &&
    ctx.projectName === 'my-critical-project' &&
    ageMs > 60 * 60 * 1000
  ) return true;

  return false;
});