MCPcopy Create free account
hub / github.com/evolution-foundation/evolution-api / keys

Method keys

src/cache/rediscache.ts:98–113  ·  view source on GitHub ↗
(appendCriteria?: string)

Source from the content-addressed store, hash-verified

96 }
97
98 async keys(appendCriteria?: string) {
99 try {
100 const match = `${this.buildKey('')}${appendCriteria ? `${appendCriteria}:` : ''}*`;
101 const keys = [];
102 for await (const key of this.client.scanIterator({
103 MATCH: match,
104 COUNT: 100,
105 })) {
106 keys.push(key);
107 }
108
109 return [...new Set(keys)];
110 } catch (error) {
111 this.logger.error(error);
112 }
113 }
114
115 buildKey(key: string) {
116 return `${this.conf?.PREFIX_KEY}:${this.module}:${key}`;

Callers 1

deleteAllMethod · 0.95

Calls 2

buildKeyMethod · 0.95
errorMethod · 0.80

Tested by

no test coverage detected