/** @packageDocumentation * @module Introspection */ import { IntrospectionResponse } from "./IntrospectionResponse"; /** The IntrospectionResponseCache is a simple dictionary of [[IntrospectionResponse]] that are currently in use. * The entries will removed automatically if their tokens expire. * @alpha */ export declare abstract class IntrospectionResponseCache { /** Adds the given response to the cache. The response will be added if it has not yet expired. * @param key A unique string to identify the response within the cache. * @param response A response associated with the key. */ add(key: string, response: IntrospectionResponse): Promise; protected abstract storeResponse(key: string, response: IntrospectionResponse): Promise; /** Gets the [[IntrospectionResponse]] for the given key. * * Note: Removes the response if it has already expired. * * @param key Key of the token entry. * @returns If the key exists and has not yet expired, the IntrospectionResponse associated with the provided key. Otherwise, undefined. */ get(key: string): Promise; protected abstract getResponse(key: string): Promise; /** * Removes the response associated with the given key from the cache. * @param key Key of the response entry. */ private remove; protected abstract deleteResponse(key: string): Promise; } /** @alpha */ export declare class MemoryIntrospectionResponseCache extends IntrospectionResponseCache { private readonly _cache; protected storeResponse(key: string, response: IntrospectionResponse): Promise; protected getResponse(key: string): Promise; protected deleteResponse(key: string): Promise; } //# sourceMappingURL=IntrospectionResponseCache.d.ts.map