From 9bea31e1b2abddafe71d19cd2757da099a3f5541 Mon Sep 17 00:00:00 2001 From: FoxxMD Date: Tue, 9 Sep 2025 20:35:11 +0000 Subject: [PATCH] docs: Add caching docs --- docsite/docs/configuration/configuration.mdx | 87 ++++++++++++++++++++ 1 file changed, 87 insertions(+) diff --git a/docsite/docs/configuration/configuration.mdx b/docsite/docs/configuration/configuration.mdx index fd29b3e6..3fb54a0c 100644 --- a/docsite/docs/configuration/configuration.mdx +++ b/docsite/docs/configuration/configuration.mdx @@ -186,6 +186,93 @@ Useful when running with [docker](../installation/installation.mdx#docker) so th +#### Caching + +Multi-scrobbler can cache some of its data for the purpose of **persisting queued and dead scrobbles** after restarting. + +It supports caching using either: + +* **File** cache stored in the `CONFIG_DIR` directory (next to your File/[AIO](./?configType=aio#configuration-types) file) +* [**Valkey**](https://valkey.io/), an open-source fork of Redis. + +**File** caching is **enabled by default** when no other configuration is present. + +The type of cache used, and it's connection properties, can be configured through ENV or **AIO** config. + +##### Caching Configuration + + + + + +**File** cache is stored in the `CONFIG_DIR` directory using the pre-defined file name `ms-scrobble.cache`. + +It is **enabled by default** if `CACHE_SCROBBLE`, or the respective AIO configuration, is not defined. + + + + + +| Environmental Variable | Required? | Default | Description | +| :--------------------- | --------- | -------------------- | ------------------------------------------------------------ | +| `CACHE_SCROBBLE` | No | `file` | The cache type to use | +| `CACHE_SCROBBLE_CONN` | No | The config directory | The directory, within the container, to store the cache file | + + + + + +```json5 title="config.json" +{ + "cache": { + "scrobble": { + "provider": "file", + "connection": "/config" + } + }, + // ... +} +``` + + + + + + + + + + + + +| Environmental Variable | Required? | Default | Description | +| :--------------------- | --------- | -------------------- | ------------------------------------------------------------ | +| `CACHE_SCROBBLE` | Yes | `valkey` | The cache type to use | +| `CACHE_SCROBBLE_CONN` | Yes | | The host/IP and port to connect to, prefixed with `redis://` -- EX: `redis://192.168.0.120:6379` | + + + + + +```json5 title="config.json" +{ + "cache": { + "scrobble": { + "provider": "valkey", + "connection": "redis://192.168.0.120:6379" + } + }, + // ... +} +``` + + + + + + + + #### Debug Mode Turning on Debug Mode will -- 2.51.2