MCPcopy
hub / github.com/npmx-dev/npmx.dev / CacheAdapter

Interface CacheAdapter

server/utils/cache/shared.ts:4–8  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2 * Generic cache adapter to allow using a local cache during development and redis in production
3 */
4export interface CacheAdapter {
5 get<T>(key: string): Promise<T | undefined>
6 set<T>(key: string, value: T, ttl?: number): Promise<void>
7 delete(key: string): Promise<void>
8}

Callers 24

resolveAuthorsFunction · 0.65
syncFileFunction · 0.65
getMockForUrlFunction · 0.65
handleFastNpmMetaFunction · 0.65
matchUrlToFixtureFunction · 0.65
requireAuthFunction · 0.65
createMockConnectorAppFunction · 0.65
getNpmAvatarFunction · 0.65
fetchBlueskyAvatarsFunction · 0.65
getPooledResultsFunction · 0.65

Implementers 2

RedisCacheAdapterserver/utils/cache/redis.ts
LocalCacheAdapterserver/utils/cache/local.ts

Calls

no outgoing calls

Tested by

no test coverage detected