refactor of data-service

This commit is contained in:
Boki 2025-06-12 08:03:09 -04:00
parent 6fb98c69f2
commit 09c97df1a8
49 changed files with 2394 additions and 112 deletions

View file

@ -289,6 +289,19 @@ export class RedisCache implements CacheProvider {
);
}
async keys(pattern: string): Promise<string[]> {
return this.safeExecute(
async () => {
const fullPattern = `${this.keyPrefix}${pattern}`;
const keys = await this.redis.keys(fullPattern);
// Remove the prefix from returned keys to match the interface expectation
return keys.map(key => key.replace(this.keyPrefix, ''));
},
[],
'keys'
);
}
async health(): Promise<boolean> {
try {
const pong = await this.redis.ping();