MCPcopy Index your code
hub / github.com/directus/directus / setCacheValue

Function setCacheValue

api/src/cache.ts:151–159  ·  view source on GitHub ↗
(
	cache: Keyv,
	key: string,
	value: Record<string, any> | Record<string, any>[],
	ttl?: number,
)

Source from the content-addressed store, hash-verified

149}
150
151export async function setCacheValue(
152 cache: Keyv,
153 key: string,
154 value: Record<string, any> | Record<string, any>[],
155 ttl?: number,
156) {
157 const compressed = await compress(value);
158 await cache.set(key, compressed, ttl);
159}
160
161export async function getCacheValue(cache: Keyv, key: string): Promise<any> {
162 const value = await cache.get(key);

Callers 6

setSystemCacheFunction · 0.85
setCacheValueWithExpiryFunction · 0.85
fetchContextDataFunction · 0.85
respond.tsFile · 0.85
foreignKeysMethod · 0.85
columnInfoMethod · 0.85

Calls 2

setMethod · 0.65
compressFunction · 0.50

Tested by

no test coverage detected