Skip to content
Extraits de code Groupes Projets
Valider 9c3e483d rédigé par Fil's avatar Fil
Parcourir les fichiers

j'ai un bug avec le quota cache !

parent 8cefa073
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -158,13 +158,14 @@ function spip_cron() {
ecrire_metas();
list ($total_cache) = spip_fetch_array(spip_query("SELECT SUM(taille)
FROM spip_caches WHERE type='t'"));
FROM spip_caches WHERE type IN ('t', 'x')"));
spip_log("Taille du CACHE: $total_cache octets");
global $quota_cache;
$total_cache -= $quota_cache*1024*1024;
if ($quota_cache > 0 AND $total_cache > 0) {
$q = spip_query("SELECT id, taille FROM spip_caches ORDER BY id");
$q = spip_query("SELECT id, taille FROM spip_caches
WHERE type IN ('t', 'x') ORDER BY id");
while ($r = spip_fetch_array($q)
AND ($total_cache > $taille_supprimee)) {
$date_limite = $r['id'];
......@@ -172,7 +173,7 @@ function spip_cron() {
}
spip_log ("Quota cache: efface $taille_supprimee octets");
include_ecrire('inc_invalideur.php3');
suivre_invalideur("id <= $date_limite AND type='t'");
suivre_invalideur("id <= $date_limite AND type in ('t', 'x')");
}
}
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter