MCPcopy
hub / github.com/TheAlgorithms/JavaScript / #removeLeastRecentlyUsed

Method #removeLeastRecentlyUsed

Cache/LRUCache.js:58–60  ·  view source on GitHub ↗

* delete oldest key existing in map by the help of iterator

()

Source from the content-addressed store, hash-verified

56 * delete oldest key existing in map by the help of iterator
57 */
58 #removeLeastRecentlyUsed() {
59 this.cache.delete(this.cache.keys().next().value)
60 }
61
62 /**
63 * @param {string} key

Callers 2

capacityMethod · 0.95
setMethod · 0.95

Calls 1

deleteMethod · 0.45

Tested by

no test coverage detected