| 53051 | SessionCache = class SimpleSessionCache { |
| 53052 | constructor(maxCachedSessions) { |
| 53053 | this._maxCachedSessions = maxCachedSessions; |
| 53054 | this._sessionCache = /* @__PURE__ */ new Map(); |
| 53055 | } |
| 53056 | get(sessionKey) { |
| 53057 | return this._sessionCache.get(sessionKey); |
| 53058 | } |
| 53059 | set(sessionKey, session) { |
| 53060 | if (this._maxCachedSessions === 0) { |
| 53061 | return; |
| 53062 | } |
| 53063 | if (this._sessionCache.size >= this._maxCachedSessions) { |
| 53064 | const { value: oldestKey } = this._sessionCache.keys().next(); |
| 53065 | this._sessionCache.delete(oldestKey); |