Skip to content

Add a cache cleanup mechanism#205

Merged
jadolg merged 6 commits intomasterfrom
add-cache-cleaning
Mar 14, 2026
Merged

Add a cache cleanup mechanism#205
jadolg merged 6 commits intomasterfrom
add-cache-cleaning

Conversation

@jadolg
Copy link
Copy Markdown
Owner

@jadolg jadolg commented Mar 14, 2026

With heavy adoption and people downloading big images my poor server is running out of space in less than a week. I have a cronjob cleaning all Sundays but that's not enough, so now we will have "per-file" cache. Every hour we will remove all files older than the maximum cache age (default: 48h)

@jadolg jadolg force-pushed the add-cache-cleaning branch from 46eb417 to 670e44e Compare March 14, 2026 20:12
jadolg added 5 commits March 14, 2026 21:24
The cache cleanup logic was using the file's modification time (mtime) to determine when to evict a file. This is incorrect for a cache where files are written once and read multiple times.
@jadolg jadolg merged commit f9d6daf into master Mar 14, 2026
7 checks passed
@jadolg jadolg deleted the add-cache-cleaning branch March 14, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant