MCPcopy Index your code
hub / github.com/formbricks/formbricks / expensiveFunction

Function expensiveFunction

packages/cache/src/cache-integration.test.ts:220–229  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

218
219 // Expensive function that we want to cache
220 const expensiveFunction = async (): Promise<{ result: string; timestamp: number; execution: number }> => {
221 executionCount++;
222 // Simulate expensive operation
223 await delay(10);
224 return {
225 result: "expensive computation result",
226 timestamp: Date.now(),
227 execution: executionCount,
228 };
229 };
230
231 // Clear any existing cache for this key
232 await cacheService.del([key]);

Callers 1

Calls 1

delayFunction · 0.70

Tested by

no test coverage detected