diff options
author | Phie <phie@phie.ovh> | 2019-08-17 18:33:52 +0300 |
---|---|---|
committer | Phie <phie@phie.ovh> | 2019-08-17 18:33:52 +0300 |
commit | 249216f58c1a7f394f7f5e88f04d79dd3d3376ab (patch) | |
tree | 7a80c3e0b367077d33d41288664b906290c97a24 | |
parent | 256774c2de59b5190ed49637776636fe44522da9 (diff) |
cache for languages
-rwxr-xr-x | lib/Controller/NoteController.php | 7 | ||||
m--------- | templates/CarnetElectron | 0 |
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/Controller/NoteController.php b/lib/Controller/NoteController.php index 006ef61..6874008 100755 --- a/lib/Controller/NoteController.php +++ b/lib/Controller/NoteController.php @@ -245,8 +245,11 @@ * @NoCSRFRequired */ public function getLangJson($lang){ - if($lang !== ".." && $lang !== "../") - return new StreamResponse(__DIR__.'/../../templates/CarnetElectron/i18n/'.$lang.".json"); + if($lang !== ".." && $lang !== "../"){ + $response = new StreamResponse(__DIR__.'/../../templates/CarnetElectron/i18n/'.$lang.".json"); + $response->cacheFor(604800); + return $response; + } else die(); } diff --git a/templates/CarnetElectron b/templates/CarnetElectron -Subproject 5c8f72a2a799102a8c4fdfa15b146a5ed63572a +Subproject 1c46bfb8ae4f726e0d0a6c742bd2b4a4a5c4d02 |