/** * Base class for OIDC caches. */ export abstract class Cache { entries: Map; /** * Create a new cache. */ constructor() { this.entries = new Map(); } /** * Clear the cache. */ clear() { this.entries.clear(); } /** * Create a cache key from the address and username. */ cacheKey(address: string, username: string, callbackHash: string): string { return JSON.stringify([address, username, callbackHash]); } }