[addon] refreshes and blacklists failed proxies

This commit is contained in:
TheBeastLT
2020-06-06 16:18:41 +02:00
parent 0361dc8096
commit 6496d7785e
3 changed files with 31 additions and 11 deletions

View File

@@ -68,5 +68,9 @@ function cacheUserAgent(id, method) {
return cacheWrap(remoteCache, `${USER_AGENT_KEY_PREFIX}:${id}`, method, { ttl: USER_AGENT_TTL });
}
module.exports = { cacheWrapStream, cacheWrapResolvedUrl, cacheWrapProxy, cacheUserAgent };
function uncacheProxy(id) {
return remoteCache.del(`${PROXY_KEY_PREFIX}:${id}`);
}
module.exports = { cacheWrapStream, cacheWrapResolvedUrl, cacheWrapProxy, cacheUserAgent, uncacheProxy };