cached fetcher delete key
This commit is contained in:
parent
1645c2aabf
commit
1d3ab23ec4
|
@ -26,6 +26,10 @@ class LRUCache {
|
|||
return value
|
||||
}
|
||||
|
||||
delete (key) {
|
||||
this.cache.delete(key)
|
||||
}
|
||||
|
||||
set (key, value) {
|
||||
if (this.cache.has(key)) this.cache.delete(key)
|
||||
else if (this.cache.size >= this.maxSize) {
|
||||
|
|
Loading…
Reference in New Issue