MCPcopy
hub / github.com/refly-ai/refly / get

Method get

apps/api/src/modules/common/redis.service.ts:184–206  ·  view source on GitHub ↗
(key: string)

Source from the content-addressed store, hash-verified

182 }
183
184 async get(key: string): Promise<string | null> {
185 if (this.client) {
186 try {
187 return await this.client.get(key);
188 } catch (error) {
189 this.logger.error(`Redis GET failed: key=${key}, error=${error}`);
190 throw error;
191 }
192 }
193
194 // In-memory implementation
195 const item = this.inMemoryStore.get(key);
196 if (!item) {
197 return null;
198 }
199
200 if (this.isExpired(item)) {
201 this.inMemoryStore.delete(key);
202 return null;
203 }
204
205 return item.value;
206 }
207
208 async incr(key: string): Promise<number> {
209 if (this.client) {

Callers 15

getJSONMethod · 0.95
app.module.tsFile · 0.45
getReadyWorkflowsMethod · 0.45
processExecutionMethod · 0.45
constructorMethod · 0.45
submitSkillToRegistryMethod · 0.45
topologicalSortMethod · 0.45
processDataMappingMethod · 0.45
constructorMethod · 0.45

Calls 3

isExpiredMethod · 0.95
errorMethod · 0.65
deleteMethod · 0.45

Tested by

no test coverage detected