From 7c96d31a9a5db279aec515ec55a0b9a9af18da7a Mon Sep 17 00:00:00 2001 From: Jonathan Barrow Date: Sun, 14 Nov 2021 12:16:50 -0500 Subject: [PATCH] Removed trello and implemented in-memory cache --- src/trello.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/trello.js b/src/trello.js index 73af865..eee6018 100644 --- a/src/trello.js +++ b/src/trello.js @@ -1,15 +1,11 @@ const Trello =require('trello'); -const Redis = require('ioredis'); -const JSONCache = require('redis-json'); const got = require('got'); const config = require('../config.json'); const trello = new Trello(config.trello.api_key, config.trello.api_token); -const redis = new Redis(); -const trelloCache = new JSONCache(redis, { prefix: 'trello:' }); +let cache; async function getTrelloCache() { - let cache = await trelloCache.get('latest'); if (!cache) { cache = await updateTrelloCache(); } @@ -64,8 +60,6 @@ async function updateTrelloCache() { } } - await trelloCache.clearAll(); - await trelloCache.set('latest', progressData); return progressData; }