/// http://doc.spip.org/@cache_valide
function cache_valide(&$page, $date) {
+ // Apparition d'un nouvel article post-date ?
+ if ($GLOBALS['meta']['post_dates'] == 'non'
+ AND isset($GLOBALS['meta']['date_prochain_postdate'])
+ AND time() > $GLOBALS['meta']['date_prochain_postdate']) {
+ spip_log('Un article post-date invalide le cache');
+ include_spip('inc/rubriques');
+ calculer_prochain_postdate(true);
+ }
+
if (defined('_VAR_NOCACHE') AND _VAR_NOCACHE) return -1;
if (isset($GLOBALS['meta']['cache_inhib']) AND $_SERVER['REQUEST_TIME']<$GLOBALS['meta']['cache_inhib']) return -1;
if (defined('_NO_CACHE')) return (_NO_CACHE==0 AND !isset($page['texte']))?1:_NO_CACHE;
AND $date < $GLOBALS['meta']['derniere_modif'])
return 1;
- // Apparition d'un nouvel article post-date ?
- if ($GLOBALS['meta']['post_dates'] == 'non'
- AND isset($GLOBALS['meta']['date_prochain_postdate'])
- AND time() > $GLOBALS['meta']['date_prochain_postdate']) {
- spip_log('Un article post-date invalide le cache');
- include_spip('inc/rubriques');
- ecrire_meta('derniere_modif', time());
- calculer_prochain_postdate();
- return 1;
- }
-
}
// Sinon comparer l'age du fichier a sa duree de cache