Skip to content

refactor(schedule): simplify cache cleaner and improve file handling#434

Merged
n0vad3v merged 2 commits into
webp-sh:masterfrom
artqqwr:refactor-cache-clean
Jun 3, 2026
Merged

refactor(schedule): simplify cache cleaner and improve file handling#434
n0vad3v merged 2 commits into
webp-sh:masterfrom
artqqwr:refactor-cache-clean

Conversation

@artqqwr

@artqqwr artqqwr commented Jan 10, 2026

Copy link
Copy Markdown
Contributor

Replaced Walk with WalkDir, added listFiles and removeOldest to collect and delete files by modification time, and consolidated cache-cleaning logic. Improved logging and error handling so the cleaner reliably removes the oldest files until the cache size limit is met and handles missing paths gracefully.
note: the previous implementation could exhibit O(n^2) behavior due to repeated directory scans; this refactor reduces redundant passes and improves performance.

@n0vad3v

n0vad3v commented Jun 3, 2026

Copy link
Copy Markdown
Member

Sorry for the long delay, nice work, thanks for PR!

@n0vad3v n0vad3v merged commit 6c204ff into webp-sh:master Jun 3, 2026
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.

2 participants