From 4143f1a8ce8694f03e2319d9d27222e0499d8978 Mon Sep 17 00:00:00 2001 From: gerlofvanek Date: Fri, 22 Nov 2024 20:01:35 +0100 Subject: [PATCH] Set offers price chart and offers table at 5 min cache. --- basicswap/static/js/offerstable.js | 2 +- basicswap/static/js/pricechart.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/basicswap/static/js/offerstable.js b/basicswap/static/js/offerstable.js index 4212e4c..79f2e05 100644 --- a/basicswap/static/js/offerstable.js +++ b/basicswap/static/js/offerstable.js @@ -10,7 +10,7 @@ const CACHE_KEY = 'latestPricesCache'; const MIN_REFRESH_INTERVAL = 60; // 60 sec -const CACHE_DURATION = 10 * 60 * 1000; // 10 minutes +const CACHE_DURATION = 5 * 60 * 1000; // 5 minutes const FALLBACK_CACHE_DURATION = 24 * 60 * 60 * 1000; // 24 hours let jsonData = []; diff --git a/basicswap/static/js/pricechart.js b/basicswap/static/js/pricechart.js index 24aaa09..81f6ec7 100644 --- a/basicswap/static/js/pricechart.js +++ b/basicswap/static/js/pricechart.js @@ -28,7 +28,7 @@ const config = { } }, showVolume: false, - cacheTTL: 10 * 60 * 1000, // 10 minutes in milliseconds + cacheTTL: 5 * 60 * 1000, // 5 minutes in milliseconds specialCoins: [''], resolutions: { year: { days: 365, interval: 'month' },