Skip to content

Cache Health

Ensuring cache integrity and performance.

Health Check

rninja -t cache-health

Output:

Cache Health Check:
  Database: OK
  Blob storage: OK
  Index integrity: OK
  Orphaned blobs: 0

Cache is healthy.

Health Issues

Database Issues

Database: ERROR

Solution:

# Try GC first
rninja -t cache-gc

# If still broken, reset
rm -rf ~/.cache/rninja

Orphaned Blobs

Orphaned blobs: 15

Solution:

rninja -t cache-gc

Index Integrity

Index integrity: ERROR

Solution:

# Reset cache
rm -rf ~/.cache/rninja
rninja  # Rebuild

Automated Health Check

#!/bin/bash
# /etc/cron.daily/rninja-health

if ! rninja -t cache-health > /dev/null 2>&1; then
    logger "rninja cache health check failed"
    rninja -t cache-gc
fi