From 92d8bd98993bdca04616bcf658fa26b69027b294 Mon Sep 17 00:00:00 2001 From: freearhey Date: Thu, 8 Aug 2019 02:41:54 +0300 Subject: [PATCH] Added clearCache() function --- helpers/util.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/helpers/util.js b/helpers/util.js index 39e1704603..48f98fc351 100644 --- a/helpers/util.js +++ b/helpers/util.js @@ -186,6 +186,10 @@ function checkCache(url) { return cache.hasOwnProperty(id) } +function clearCache() { + cache = {} +} + function getUrlPath(u) { let parsed = urlParser.parse(u) let searchQuery = parsed.search || '' @@ -204,5 +208,6 @@ module.exports = { createChannel, getBasename, addToCache, - checkCache + checkCache, + clearCache } \ No newline at end of file