From 14a2e34db56d089b6eb4fcbde01788d5747d3548 Mon Sep 17 00:00:00 2001
From: Benoit Lavenier <benoit.lavenier@e-is.pro>
Date: Tue, 24 Dec 2019 10:18:31 +0100
Subject: [PATCH] [fix] BMA: increase cache duration for some Duniter BMA long
 requests

---
 www/js/services/bma-services.js | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/www/js/services/bma-services.js b/www/js/services/bma-services.js
index 76dd2e38..7b9f2cf2 100644
--- a/www/js/services/bma-services.js
+++ b/www/js/services/bma-services.js
@@ -399,7 +399,7 @@ angular.module('cesium.bma.services', ['ngApi', 'cesium.http.services', 'cesium.
       node: {
         summary: get('/node/summary', csHttp.cache.LONG),
         same: function(host2, port2) {
-          return host2 == that.host && ((!that.port && !port2) || (that.port == port2||80)) && (that.useSsl == (port2 && port2 === 443));
+          return host2 === that.host && ((!that.port && !port2) || (that.port == port2||80)) && (that.useSsl == (port2 && port2 === 443));
         },
         forceUseSsl: that.forceUseSsl
       },
@@ -415,26 +415,26 @@ angular.module('cesium.bma.services', ['ngApi', 'cesium.http.services', 'cesium.
         }
       },
       wot: {
-        lookup: get('/wot/lookup/:search'),
+        lookup: get('/wot/lookup/:search', csHttp.cache.MEDIUM),
         certifiedBy: get('/wot/certified-by/:pubkey'),
         certifiersOf: get('/wot/certifiers-of/:pubkey'),
         member: {
           all: get('/wot/members', csHttp.cache.LONG),
           pending: get('/wot/pending', csHttp.cache.SHORT)
         },
-        requirements: get('/wot/requirements/:pubkey'),
+        requirements: get('/wot/requirements/:pubkey', csHttp.cache.LONG),
         add: post('/wot/add'),
         certify: post('/wot/certify'),
         revoke: post('/wot/revoke')
       },
       blockchain: {
-        parameters: get('/blockchain/parameters', csHttp.cache.LONG),
+        parameters: get('/blockchain/parameters', csHttp.cache.MONTH),
         block: get('/blockchain/block/:block', csHttp.cache.SHORT),
         blocksSlice: get('/blockchain/blocks/:count/:from'),
         current: get('/blockchain/current'),
         membership: post('/blockchain/membership'),
         stats: {
-          ud: get('/blockchain/with/ud', csHttp.cache.SHORT),
+          ud: get('/blockchain/with/ud', csHttp.cache.MEDIUM),
           tx: get('/blockchain/with/tx'),
           newcomers: get('/blockchain/with/newcomers'),
           hardship: get('/blockchain/hardship/:pubkey'),
-- 
GitLab