fix(cache): improve support for Valkey

Signed-off-by: Benjamin Janssens <benji.janssens@gmail.com>
This commit is contained in:
Benjamin Janssens
2025-10-22 17:32:10 +02:00
parent 4e5229e3ff
commit 2bc4e02903
6 changed files with 166 additions and 70 deletions
+4 -1
View File
@@ -27,6 +27,9 @@ backend:
# Other Redis-specific options...
clearBatchSize: 1000
useUnlink: false
valkey:
# Optional: Global namespace prefix for all cache keys (including separator used between namespace and plugin ID)
keyPrefix: 'my-app:'
```
### Namespace Configuration
@@ -36,7 +39,7 @@ For Redis and Valkey stores, you can configure a global namespace that will be p
- **Without namespace**: Cache keys use only the plugin ID (e.g., `catalog:some-key`)
- **With namespace**: Cache keys use the format `namespace:pluginId:key` (e.g., `my-app:catalog:some-key`)
The `keyPrefixSeparator` controls what character is used between the namespace and plugin ID (defaults to `:`).
For Redis, `keyPrefixSeparator` controls what character is used between the namespace and plugin ID (defaults to `:`).
**Note**: Memory and Memcache stores do not support namespace configuration and will always use the plugin ID directly.