From 63e38a5fa780ab31f8fa782467a69924d312d5b2 Mon Sep 17 00:00:00 2001 From: Heng-Yi Wu <2316687+henry40408@users.noreply.github.com> Date: Wed, 19 Apr 2023 23:25:13 +0800 Subject: [PATCH] refactor: cache the token as long as possible During installation, the salt is generated and remains constant unless the user re-installs the FreshRSS instance. --- src/widgets/freshrss/proxy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/freshrss/proxy.js b/src/widgets/freshrss/proxy.js index 203f2ed6..a5f2239e 100644 --- a/src/widgets/freshrss/proxy.js +++ b/src/widgets/freshrss/proxy.js @@ -27,7 +27,7 @@ async function login(widget, service) { try { const [, token] = data.toString().split("\n").find(line => line.startsWith("Auth=")).split("=") - cache.put(`${sessionTokenCacheKey}.${service}`, token, 30 * 60 * 1000); // 30m + cache.put(`${sessionTokenCacheKey}.${service}`, token); return { token }; } catch (e) { logger.error("Unable to login to FreshRSS API: %s", e);