MDL-51482 caching: Fix unnecessary updates to lastinvalidation time

This commit is contained in:
Matt Petro
2015-11-10 18:28:34 +01:00
committed by Eloy Lafuente (stronk7)
parent 8b94100661
commit 9873593120
2 changed files with 48 additions and 2 deletions
+6 -2
View File
@@ -1270,7 +1270,9 @@ class cache_application extends cache implements cache_loader_with_locking {
$this->delete_many($todelete);
}
// Set the time of the last invalidation.
$this->set('lastinvalidation', cache::now());
if ($purgeall || !empty($todelete)) {
$this->set('lastinvalidation', cache::now());
}
}
}
@@ -1669,7 +1671,9 @@ class cache_session extends cache {
$this->delete_many($todelete);
}
// Set the time of the last invalidation.
$this->set('lastsessioninvalidation', cache::now());
if ($purgeall || !empty($todelete)) {
$this->set('lastsessioninvalidation', cache::now());
}
}
}