MCPcopy Index your code
hub / github.com/BlockRunAI/ClawRouter / get

Method get

src/response-cache.ts:169–185  ·  view source on GitHub ↗

* Get cached response if available and not expired.

(key: string)

Source from the content-addressed store, hash-verified

167 * Get cached response if available and not expired.
168 */
169 get(key: string): CachedLLMResponse | undefined {
170 const entry = this.cache.get(key);
171 if (!entry) {
172 this.stats.misses++;
173 return undefined;
174 }
175
176 // Check expiration
177 if (Date.now() > entry.expiresAt) {
178 this.cache.delete(key);
179 this.stats.misses++;
180 return undefined;
181 }
182
183 this.stats.hits++;
184 return entry;
185 }
186
187 /**
188 * Cache a response with optional custom TTL.

Callers 15

startMockServerFunction · 0.80
runTestsFunction · 0.80
runLocalSuiteFunction · 0.80
full-flow.test.tsFile · 0.80
registerFunction · 0.80
recordProviderErrorFunction · 0.80
isRateLimitedFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected