Skip to content

Commit

Permalink
PR feedback: remove cache.delete function
Browse files Browse the repository at this point in the history
  • Loading branch information
Daan committed Oct 15, 2024
1 parent c1e56fd commit edc7010
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions lib/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class MemoryCache {
if (cached.expiresAt > Date.now() || cached.expiresAt === 0) {
return cached.value;
}
this.delete(key);
this.cache.delete(key);
}
return undefined;
}
Expand All @@ -44,15 +44,6 @@ class MemoryCache {
});
}

/**
* Deletes cache entry for key
* @param {string} key Cache key
* @return {void}
*/
delete (key) {
this.cache.delete(key);
}

/**
* Clear cache
* @returns {void}
Expand Down

0 comments on commit edc7010

Please sign in to comment.