[PR #506] [MERGED] Feature split cache folders, resolves #505 #954

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

📋 Pull Request Information

Original PR: https://github.com/librespot-org/librespot/pull/506
Author: @LaurentLouf
Created: 7/25/2020
Status: Merged
Merged: 1/2/2021
Merged by: @sashahilton00

Base: devHead: feature-split_cache_folders


📝 Commits (5)

  • 8fc9ebf Add the option to specify the system cache for credentials and volume files and adapt Cache to use two cache directories instead of one
  • 77cb66d Fix syntax
  • 09bebe5 Fix types
  • c14c254 Format
  • b340326 Don't create directories for the audio cache if it disabled

📊 Changes

2 files changed (+32 additions, -12 deletions)

View changed files

📝 core/src/cache.rs (+17 -9)
📝 src/main.rs (+15 -3)

📄 Description

Cache split for system files (credentials and volume) and audio files. Retro-compatible by making the system cache the same as the audio cache if the option is not specified.

I kept the same directory tree for the audio cache by keeping the files directory, might not be needed.

Use case for this new option : splitting the cache into two : audio cache in a temporary directory, for example a tmpfs in RAM to minimize writes to the SD card when used on a Raspberry, but system cache in a "permanent" directory, to be available across reboots. Even on a normal PC, you may want to use the HDD for the audio cache and the SSD for system cache to minimize the number of writes on your SSD.

Happy to change anything if needed, this is my first time writing some Rust


🔄 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/506 **Author:** [@LaurentLouf](https://github.com/LaurentLouf) **Created:** 7/25/2020 **Status:** ✅ Merged **Merged:** 1/2/2021 **Merged by:** [@sashahilton00](https://github.com/sashahilton00) **Base:** `dev` ← **Head:** `feature-split_cache_folders` --- ### 📝 Commits (5) - [`8fc9ebf`](https://github.com/librespot-org/librespot/commit/8fc9ebfa8c9ffca250c06ba20a0efb76c73a293a) Add the option to specify the system cache for credentials and volume files and adapt Cache to use two cache directories instead of one - [`77cb66d`](https://github.com/librespot-org/librespot/commit/77cb66d9a3b276702723228d8ec76c8ecd7f798a) Fix syntax - [`09bebe5`](https://github.com/librespot-org/librespot/commit/09bebe5dd7ad1f637f9767a2e12d838949afc3d7) Fix types - [`c14c254`](https://github.com/librespot-org/librespot/commit/c14c254c6b2adab3d7959228feff8026f40789b0) Format - [`b340326`](https://github.com/librespot-org/librespot/commit/b34032690b4cdcf23e409146abe0df17048914a9) Don't create directories for the audio cache if it disabled ### 📊 Changes **2 files changed** (+32 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `core/src/cache.rs` (+17 -9) 📝 `src/main.rs` (+15 -3) </details> ### 📄 Description Cache split for system files (credentials and volume) and audio files. Retro-compatible by making the system cache the same as the audio cache if the option is not specified. I kept the same directory tree for the audio cache by keeping the `files` directory, might not be needed. Use case for this new option : splitting the cache into two : audio cache in a temporary directory, for example a `tmpfs` in RAM to minimize writes to the SD card when used on a Raspberry, but system cache in a "permanent" directory, to be available across reboots. Even on a normal PC, you may want to use the HDD for the audio cache and the SSD for system cache to minimize the number of writes on your SSD. Happy to change anything if needed, this is my first time writing some Rust --- <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:35 +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#954
No description provided.