UNPKG

@credo-ts/core

Version:

<p align="center"> <br /> <img alt="Credo Logo" src="https://github.com/openwallet-foundation/credo-ts/blob/c7886cb8377ceb8ee4efe8d264211e561a75072d/images/credo-logo.png" height="250px" /> </p> <h1 align="center"><b>Credo - Core</b></h1

23 lines • 1.07 kB
import { AgentContext } from "../../agent/context/AgentContext.mjs"; import "../../agent/context/index.mjs"; //#region src/modules/cache/Cache.d.ts export interface CacheOptions { /** * The scope of the cache entry: * * - `'context'` (default): the entry is isolated to the `contextCorrelationId` of the provided * agent context. Implementations MUST default to this scope. * - `'global'`: the entry is shared across all agent contexts. Only use this for public, * non-context-specific data (e.g. CRLs, DID documents of public DID methods, ledger objects). * * @default 'context' */ scope?: 'context' | 'global'; } export interface Cache { get<CacheValue>(agentContext: AgentContext, key: string, options?: CacheOptions): Promise<CacheValue | null>; set<CacheValue>(agentContext: AgentContext, key: string, value: CacheValue, expiresInSeconds?: number, options?: CacheOptions): Promise<void>; remove(agentContext: AgentContext, key: string, options?: CacheOptions): Promise<void>; } //#endregion //# sourceMappingURL=Cache.d.mts.map