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:
- For each registered eval and enrichment, Claudeye checks the cache
- If a valid cached result exists, it’s served immediately
- 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
| Field | Description |
|---|
itemName | Eval or enrichment name |
itemKind | "evals" or "enrichments" |
cachedAt | ISO timestamp of when the result was cached |
cachedValue | The full cached result object |
projectName | Project name |
sessionId | Session ID |
contentHash | Hash of the session file content |
itemCodeHash | Hash 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;
});