(key: K)
| 38 | } |
| 39 | |
| 40 | private updateKeyUsage(key: K) { |
| 41 | const index = this.keysInUse.indexOf(key) |
| 42 | if (index !== -1) { |
| 43 | this.keysInUse.splice(index, 1) |
| 44 | } |
| 45 | this.keysInUse.push(key) |
| 46 | } |
| 47 | |
| 48 | private evictLeastRecentlyUsed() { |
| 49 | const keyToEvict = this.keysInUse.shift() |
no outgoing calls
no test coverage detected