MCPcopy Create free account
hub / github.com/TheAlgorithms/JavaScript / CacheNode

Class CacheNode

Cache/LFUCache.js:1–9  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1class CacheNode {
2 constructor(key, value, frequency) {
3 this.key = key
4 this.value = value
5 this.frequency = frequency
6
7 return Object.seal(this)
8 }
9}
10
11// This frequency map class will act like javascript Map DS with more two custom method refresh & insert
12class FrequencyMap extends Map {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected