(key, value = null)
| 339 | |
| 340 | // Set value, and return that value. If value is null, then delete key. |
| 341 | set(key, value = null) { |
| 342 | this.rotate(); |
| 343 | delete this.previous[key]; |
| 344 | if (value != null) { |
| 345 | return this.cache[key] = value; |
| 346 | } else { |
| 347 | delete this.cache[key]; |
| 348 | return null; |
| 349 | } |
| 350 | } |
| 351 | |
| 352 | get(key) { |
| 353 | this.rotate(); |
no test coverage detected