(key)
| 42 | } |
| 43 | |
| 44 | del(key) { |
| 45 | var record = this.cache[key]; |
| 46 | if (record == null) { |
| 47 | return; |
| 48 | } |
| 49 | |
| 50 | if (record.timeout) { |
| 51 | clearTimeout(record.timeout); |
| 52 | } |
| 53 | delete this.cache[key]; |
| 54 | } |
| 55 | |
| 56 | clear() { |
| 57 | this.cache = Object.create(null); |