Song Cache
On-disk audio caching and queue prefetching, including size limits, eviction, and range-request handling.
The Song Cache keeps decoded song bytes on disk so replays start instantly and so the active queue can be fetched ahead of time.
Configure it in Settings → Song Cache.
Settings
| Setting | Values | Default |
|---|---|---|
| Enabled | on / off | on |
| Maximum size | 128 MB to 4096 MB, in 128 MB steps | 512 MB |
Sizes are rounded to the nearest 128 MB step, so entering an arbitrary number produces the closest valid value rather than an error.
Where it lives
A song-cache directory inside Orchard’s per-user data directory:
| Platform | Path |
|---|---|
| Windows | %APPDATA%\Orchard\song-cache |
| macOS | ~/Library/Application Support/Orchard/song-cache |
| Linux | ~/.config/Orchard/song-cache |
Behavior
Eviction. When the cache exceeds its configured size, older entries are removed to make room. Raising the limit does not re-fetch anything; it simply stops evicting as early.
Prefetching. Orchard fetches upcoming queue items ahead of playback, which matters most for Smart Crossfade, since a beat-matched transition needs both tracks decodable up to 30 seconds before the mix.
Partial responses. The cache serves HTTP range requests, so seeking into a partially cached track works without waiting for the whole file.
Partial writes. A download interrupted mid-write leaves a partial file. Those are cleaned up when the cache directory is next prepared, so a crash or a forced quit does not leave corrupt entries behind.
Write lag. Writes are allowed to lag playback by up to 8 MB. Past that, the cache stops buffering ahead rather than growing memory pressure while a slow disk catches up.
Clearing it
The settings section reports current usage and can clear the cache. Deleting the
song-cache directory while Orchard is closed has the same effect.
Interaction with the rest of Orchard
The cache stores audio bytes only. Catalog metadata, artwork, analysis results, and your library are cached separately and are unaffected by clearing it.
Disabling the cache does not disable Smart Crossfade, though transitions may prepare more slowly on a poor connection because both tracks have to be fetched fresh.
Source map
| Path | Role |
|---|---|
electron/playback/songCache.js | On-disk bytes, eviction, range handling |
electron/playback/playbackStreamCache.js | In-flight stream reuse |
src/app/playback/songCacheActions.js | Renderer actions |
src/app/playback/songCachePreferences.js | Settings normalization |
src/components/settings/SongCacheSection.vue | Settings UI |