Garbage Collection¶
Managing cache storage with garbage collection.
Running GC¶
What Gets Cleaned¶
- Entries older than
max_age - Oldest entries when exceeding
max_size - Orphaned blob files
- Corrupt entries
Scheduling GC¶
Cron¶
Systemd Timer¶
# /etc/systemd/system/rninja-gc.timer
[Unit]
Description=rninja GC Timer
[Timer]
OnCalendar=weekly
Persistent=true
[Install]
WantedBy=timers.target
# /etc/systemd/system/rninja-gc.service
[Unit]
Description=rninja Garbage Collection
[Service]
Type=oneshot
ExecStart=/usr/local/bin/rninja -t cache-gc