From 24295e6ac8ddb530a3855b7ca18e603e1f0fe63a Mon Sep 17 00:00:00 2001 From: Umair Khan Date: Wed, 12 Apr 2017 10:44:30 +0500 Subject: [PATCH] i18next: Add expirationTime option to cache. This ensures that we don't fill up local storage with cached translations data when using a server that restarts often (e.g. a development environment). Fixes: #4443. --- static/js/src/main.js | 1 + 1 file changed, 1 insertion(+) diff --git a/static/js/src/main.js b/static/js/src/main.js index 58c20ca733..1c9299d53f 100644 --- a/static/js/src/main.js +++ b/static/js/src/main.js @@ -20,6 +20,7 @@ var cacheOptions = { enabled: true, prefix: 'i18next:' + page_params.server_generation + ':', + expirationTime: 2*7*24*60*60*1000, // 2 weeks }; i18n.use(XHR)