aboutsummaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-11-28 16:37:27 +0100
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2013-11-28 16:37:27 +0100
commitdc2e1dc0817f0818943647d6b005ea35683c9c1b (patch)
treeac61a07ad75fa9839708ef4b203f6fdff0c7561f /public
parente3fc889e5178e82e5bf341c97c5a6d0ec8766f19 (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-xpublic/index.php18
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 ()