You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
598 B
JavaScript
28 lines
598 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.Cache = void 0;
|
|
/**
|
|
* Base class for OIDC caches.
|
|
*/
|
|
class Cache {
|
|
/**
|
|
* 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, username, callbackHash) {
|
|
return JSON.stringify([address, username, callbackHash]);
|
|
}
|
|
}
|
|
exports.Cache = Cache;
|
|
//# sourceMappingURL=cache.js.map
|