aboutsummaryrefslogtreecommitdiff
path: root/public/index.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-11-28 20:59:31 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-11-28 20:59:31 +0100
commit7cdc477c45a84bde56f5253ce34924f164e6ca0a (patch)
tree3a96589de76048d1cce3b92b0b427056ce08ea5d /public/index.php
parent6a9ce0cbadb8b2f57ee386e4b4a3bb9857af085a (diff)
touch en microsecondes
Passage en microsecondes pour le touch (gestion du cache) pour éviter les problèmes en particulier dans le cas de requêtes de moins d'une seconde. Nouvelle fonction invalidateHttpCache() pour plus facilement changer de méthode de contrôle de fraîcheur de cache. Devrait résoudre https://github.com/marienfressinaud/FreshRSS/issues/296
Diffstat (limited to 'public/index.php')
-rwxr-xr-xpublic/index.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/public/index.php b/public/index.php
index 9bf4fc073..cabd836d5 100755
--- a/public/index.php
+++ b/public/index.php
@@ -27,10 +27,11 @@ if (file_exists ('install.php')) {
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
+ @filemtime(DATA_PATH . '/touch.txt'),
+ @filemtime(LOG_PATH . '/application.log'),
+ @filemtime(DATA_PATH . '/application.ini')
);
+ $_SERVER['QUERY_STRING'] .= '&utime=' . file_get_contents(DATA_PATH . '/touch.txt');
if (httpConditional($dateLastModification, 0, 0, false, false, true)) {
exit(); //No need to send anything
}