[GH-ISSUE #412] expire cached audio files #267

Closed
opened 2026-02-27 19:29:43 +03:00 by kerem · 1 comment
Owner

Originally created by @azrdev on GitHub (Dec 14, 2019).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/412

As I read dev/core/src/cache.rs it seems the cache_path is filled with audio files and read from, but never expired, so eventually the disk will run full.
I can manually expire old cache entries that have not been used in a time, e.g. with a daily cronjob running find $CACHE_DIR -type f -atime +30 -delete, but maybe you consider pruning the cache in scope?

Originally created by @azrdev on GitHub (Dec 14, 2019). Original GitHub issue: https://github.com/librespot-org/librespot/issues/412 As I read `dev/core/src/cache.rs` it seems the `cache_path` is filled with audio files and read from, but never expired, so eventually the disk will run full. I can manually expire old cache entries that have not been used in a time, e.g. with a daily cronjob running `find $CACHE_DIR -type f -atime +30 -delete`, but maybe you consider pruning the cache in scope?
kerem closed this issue 2026-02-27 19:29:44 +03:00
Author
Owner

@sashahilton00 commented on GitHub (Dec 17, 2019):

I seem to remember there was an older issue that looked at this. There were some nuances involved, though I can't find it right now. Will look again later and try to link to it.

EDIT: It might be #34. There was discussion about the work required in there, but equally we might be able to use a crate like https://crates.io/crates/rocket-file-cache to implement a size based cache.

<!-- gh-comment-id:566352893 --> @sashahilton00 commented on GitHub (Dec 17, 2019): I seem to remember there was an older issue that looked at this. There were some nuances involved, though I can't find it right now. Will look again later and try to link to it. EDIT: It might be #34. There was discussion about the work required in there, but equally we might be able to use a crate like https://crates.io/crates/rocket-file-cache to implement a size based cache.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#267
No description provided.