[PR #675] [MERGED] Add size limit to cache #1012

Closed
opened 2026-02-27 20:00:49 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/librespot-org/librespot/pull/675
Author: @Johannesd3
Created: 3/19/2021
Status: Merged
Merged: 5/1/2021
Merged by: @sashahilton00

Base: devHead: limit-cache-size


📝 Commits (3)

  • e9dc9cd Add size limit to cache
  • de6bc32 Add documentation, logging and tests
  • e355d4a Add cache-size-limit command line argument

📊 Changes

6 files changed (+429 additions, -35 deletions)

View changed files

📝 Cargo.lock (+28 -0)
📝 Cargo.toml (+1 -0)
📝 core/Cargo.toml (+1 -0)
📝 core/src/cache.rs (+310 -32)
📝 playback/src/player.rs (+7 -2)
📝 src/main.rs (+82 -1)

📄 Description

Limits cache size by calculating the size of the directory on loading of the application and keeping track of additions and removals. As soon as the limit is exceeded, the least recently accessed files are deleted.

Resolves #642.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/librespot-org/librespot/pull/675 **Author:** [@Johannesd3](https://github.com/Johannesd3) **Created:** 3/19/2021 **Status:** ✅ Merged **Merged:** 5/1/2021 **Merged by:** [@sashahilton00](https://github.com/sashahilton00) **Base:** `dev` ← **Head:** `limit-cache-size` --- ### 📝 Commits (3) - [`e9dc9cd`](https://github.com/librespot-org/librespot/commit/e9dc9cd8393443633bdf0c2d237ad7bfa682012c) Add size limit to cache - [`de6bc32`](https://github.com/librespot-org/librespot/commit/de6bc32deac30afd681a656ca9ea1464af18e1e0) Add documentation, logging and tests - [`e355d4a`](https://github.com/librespot-org/librespot/commit/e355d4a4f16affaf711b4f5944b4b0bd7da8045b) Add cache-size-limit command line argument ### 📊 Changes **6 files changed** (+429 additions, -35 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.lock` (+28 -0) 📝 `Cargo.toml` (+1 -0) 📝 `core/Cargo.toml` (+1 -0) 📝 `core/src/cache.rs` (+310 -32) 📝 `playback/src/player.rs` (+7 -2) 📝 `src/main.rs` (+82 -1) </details> ### 📄 Description Limits cache size by calculating the size of the directory on loading of the application and keeping track of additions and removals. As soon as the limit is exceeded, the least recently accessed files are deleted. Resolves #642. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 20:00:49 +03:00
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#1012
No description provided.