MCPcopy Create free account
hub / github.com/comuline/api / constructor

Method constructor

src/modules/v1/cache.ts:7–16  ·  view source on GitHub ↗
(
    protected env: {
      UPSTASH_REDIS_REST_TOKEN: string
      UPSTASH_REDIS_REST_URL: string
    },
    key: string,
  )

Source from the content-addressed store, hash-verified

5 public key: string
6
7 constructor(
8 protected env: {
9 UPSTASH_REDIS_REST_TOKEN: string
10 UPSTASH_REDIS_REST_URL: string
11 },
12 key: string,
13 ) {
14 this.key = key
15 this.kv = Redis.fromEnv(env)
16 }
17
18 async get(): Promise<T | null> {
19 const data = await this.kv.get<T>(this.key)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected