Skip to content
Snippets Groups Projects
Commit 1900bfe8 authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

[enh] Wot add a cache on load requirements

[enh] Make sure to clean all cache when BMA node changed
[enh] Cesium+: Add cache on some requests
parent 42c4f3c9
No related branches found
No related tags found
No related merge requests found
......@@ -12,38 +12,78 @@ angular.module("cesium.config", [])
"cacheTimeMs": 300000,
"fallbackLanguage": "en",
"rememberMe": true,
"timeout": 300000,
"showUDHistory": true,
"timeout": 40000,
"timeWarningExpireMembership": 5184000,
"timeWarningExpire": 7776000,
"keepAuthIdle": 600,
"useLocalStorage": true,
"useRelative": false,
"expertMode": true,
"expertMode": false,
"decimalCount": 2,
"httpsMode": false,
"shareBaseUrl": "https://g1.duniter.fr",
"helptip": {
"enable": false,
"enable": true,
"installDocUrl": {
"fr-FR": "https://duniter.org/fr/wiki/duniter/installer/",
"en": "https://github.com/duniter/duniter/blob/master/doc/install-a-node.md"
"en": "https://duniter.org/en/wiki/duniter/install/"
}
},
"license": {
"en": "license/license_g1-en",
"fr-FR": "license/license_g1-fr-FR",
"es-ES": "license/license_g1-es-ES"
},
"node": {
"host": "g1-test.duniter.org",
"host": "g1.duniter.org",
"port": 443
},
"fallbackNodes": [
{
"host": "g1-test.cgeek.fr",
"host": "g1.nordstrom.duniter.org",
"port": 443
},
{
"host": "g1.cgeek.fr",
"port": 443
},
{
"host": "g1.monnaielibreoccitanie.org",
"port": 443
},
{
"host": "g1.le-sou.org",
"port": 443
},
{
"host": "g1.duniter.fr",
"port": 443
}
],
"developers": [
{
"name": "Benoit Lavenier",
"pubkey": "38MEAZN68Pz1DTvT3tqgxx4yQP6snJCQhPqEFxbDk4aE"
}
],
"plugins": {
"es": {
"enable": true,
"askEnable": true,
"useRemoteStorage": true,
"host": "g1-test.data.duniter.fr",
"host": "g1.data.duniter.fr",
"port": 443,
"fallbackNodes": [
{
"host": "g1.data.le-sou.org",
"port": 443
},
{
"host": "g1.data.duniter.fr",
"port": 443
}
],
"notifications": {
"txSent": true,
"txReceived": true,
......@@ -54,7 +94,7 @@ angular.module("cesium.config", [])
}
},
"version": "1.4.12",
"build": "2019-12-19T14:53:37.759Z",
"build": "2019-12-23T16:20:00.370Z",
"newIssueUrl": "https://git.duniter.org/clients/cesium-grp/cesium/issues/new"
})
......
......@@ -1190,7 +1190,7 @@ angular.module('cesium.wot.services', ['ngApi', 'cesium.bma.services', 'cesium.c
api.registerEvent('data', 'search');
// Listen if node changed
BMA.api.node.on.restart($rootScope, cleanCache, this);
BMA.api.node.on.stop($rootScope, cleanCache, this);
return {
id: id,
......
......@@ -74,8 +74,16 @@ angular.module('cesium.es.wot.services', ['ngResource', 'cesium.es.http.services
return result;
});
},
cleanCache = function() {
console.debug('[ES] [wot] Clean cache...');
csCache.clear(cachePrefix);
};
// Listen if node changed
esHttp.api.node.on.stop($rootScope, cleanCache, this);
return {
memberships: loadMemberships
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment