[develop | DONE | FIX ] Cache: fix clear specific url

This commit is contained in:
argirok 2024-07-19 11:13:54 +03:00
parent 706fe7cd07
commit 1e06fb0404
2 changed files with 2 additions and 2 deletions

View File

@ -107,7 +107,7 @@ app.get('/clear', (req, res) => {
const url = req.query.url; const url = req.query.url;
let message = ""; let message = "";
if (url) { if (url) {
let key = '__express__' + req.query.url; let key = req.query.url;
lruCache.delete(key); lruCache.delete(key);
message = "Delete entry with key " + url; message = "Delete entry with key " + url;
entries.set(lruCache.size); entries.set(lruCache.size);

View File

@ -1,6 +1,6 @@
{ {
"name": "memcache-cache", "name": "memcache-cache",
"version": "1.0.0", "version": "2.0.0",
"description": "Caching in memory", "description": "Caching in memory",
"main": "cache.js", "main": "cache.js",
"scripts": { "scripts": {