Skip to content

Instantly share code, notes, and snippets.

@digitalconceptvisuals
Created Jul 29, 2020
Embed
What would you like to do?
set(key, value) {
let result = super.set(key, value);
// Update the frequency of the key
this.#updateFrequency(key);
return result;
}
get(key) {
let exists = super.get(key);
// Don't update non existing gets
if (exists)
this.#updateFrequency(key);
return exists;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment