fix(cache): pass useRedisSets option to KeyvRedis cache storage adapter
Co-authored-by: Patrik Oldsberg <poldsberg@gmail.com> Signed-off-by: zcmander <zcmander@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/backend-defaults': patch
|
||||
---
|
||||
|
||||
Fixed an issue where the `useRedisSets` configuration for the cache service would have no effect.
|
||||
@@ -147,7 +147,9 @@ export class CacheManager {
|
||||
let store: typeof KeyvRedis | undefined;
|
||||
return (pluginId, defaultTtl) => {
|
||||
if (!store) {
|
||||
store = new KeyvRedis(this.connection);
|
||||
store = new KeyvRedis(this.connection, {
|
||||
useRedisSets: this.useRedisSets,
|
||||
});
|
||||
// Always provide an error handler to avoid stopping the process
|
||||
store.on('error', (err: Error) => {
|
||||
this.logger?.error('Failed to create redis cache client', err);
|
||||
|
||||
Reference in New Issue
Block a user