MCPcopy
hub / github.com/directus/directus / setSystemCache

Function setSystemCache

api/src/cache.ts:119–125  ·  view source on GitHub ↗
(key: string, value: any, ttl?: number)

Source from the content-addressed store, hash-verified

117}
118
119export async function setSystemCache(key: string, value: any, ttl?: number): Promise<void> {
120 const { systemCache, lockCache } = getCache();
121
122 if (!(await lockCache.get('system-cache-lock'))) {
123 await setCacheValue(systemCache, key, value, ttl);
124 }
125}
126
127export async function getSystemCache(key: string): Promise<Record<string, any>> {
128 const { systemCache } = getCache();

Callers

nothing calls this directly

Calls 3

setCacheValueFunction · 0.85
getCacheFunction · 0.70
getMethod · 0.65

Tested by

no test coverage detected