Added clearCache() function

This commit is contained in:
freearhey 2019-08-08 02:41:54 +03:00
parent 3501aed08b
commit 92d8bd9899
1 changed files with 6 additions and 1 deletions

View File

@ -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
}