* Gets the value associated with the specified key. * * @experimental **UNSTABLE**: New API, yet to be vetted. * * When code TtlCacheOptions.slidingExpiration | slidingExpiration is * enabled, accessing an entry resets its TTL. * * @param key The key to get the value for.
(key: K)
| 219 | * ``` |
| 220 | */ |
| 221 | override get(key: K): V | undefined { |
| 222 | if (!super.has(key)) return undefined; |
| 223 | if (this.#slidingExpiration) this.#resetTtl(key); |
| 224 | return super.get(key); |
| 225 | } |
| 226 | |
| 227 | /** |
| 228 | * Returns the value associated with the given key, or `undefined` if the |