diff options
| author | 2013-11-28 16:37:27 +0100 | |
|---|---|---|
| committer | 2013-11-28 16:37:27 +0100 | |
| commit | dc2e1dc0817f0818943647d6b005ea35683c9c1b (patch) | |
| tree | ac61a07ad75fa9839708ef4b203f6fdff0c7561f /public | |
| parent | e3fc889e5178e82e5bf341c97c5a6d0ec8766f19 (diff) | |
Annulation du cache via no-cache.txt
La présence du fichier DATA_PATH/no-cache.txt permet de désactiver le
cache. Ce fichier n'est pas présent par défaut
Corrige #297
Diffstat (limited to 'public')
| -rwxr-xr-x | public/index.php | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/public/index.php b/public/index.php index 9d1ee711c..9bf4fc073 100755 --- a/public/index.php +++ b/public/index.php @@ -24,14 +24,16 @@ if (file_exists ('install.php')) { require('../constants.php'); session_cache_limiter(''); - require (LIB_PATH . '/http-conditional.php'); - $dateLastModification = max( - @filemtime(DATA_PATH . '/touch.txt') - 1, - @filemtime(LOG_PATH . '/application.log') - 1, - @filemtime(DATA_PATH . '/application.ini') - 1 - ); - if (httpConditional($dateLastModification, 0, 0, false, false, true)) { - exit(); //No need to send anything + if (!file_exists(DATA_PATH . '/no-cache.txt')) { + require (LIB_PATH . '/http-conditional.php'); + $dateLastModification = max( + @filemtime(DATA_PATH . '/touch.txt') - 1, + @filemtime(LOG_PATH . '/application.log') - 1, + @filemtime(DATA_PATH . '/application.ini') - 1 + ); + if (httpConditional($dateLastModification, 0, 0, false, false, true)) { + exit(); //No need to send anything + } } set_include_path (get_include_path () |
