Skip to content
Snippets Groups Projects
Commit 4b2dfc3a authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #1719250 by catch: Fixed DatabaseBackend still calling...

- Patch #1719250 by catch: Fixed DatabaseBackend still calling garbageCollection() every request due to minimum cache lifetime.
parent 9a0367fa
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -53,9 +53,6 @@ function get($cid) { ...@@ -53,9 +53,6 @@ function get($cid) {
*/ */
function getMultiple(&$cids) { function getMultiple(&$cids) {
try { try {
// Garbage collection necessary when enforcing a minimum cache lifetime.
$this->garbageCollection($this->bin);
// When serving cached pages, the overhead of using db_select() was found // When serving cached pages, the overhead of using db_select() was found
// to add around 30% overhead to the request. Since $this->bin is a // to add around 30% overhead to the request. Since $this->bin is a
// variable, this means the call to db_query() here uses a concatenated // variable, this means the call to db_query() here uses a concatenated
...@@ -109,8 +106,7 @@ protected function prepareItem($cache) { ...@@ -109,8 +106,7 @@ protected function prepareItem($cache) {
} }
} }
// If the data is permanent or not subject to a minimum cache lifetime, // Unserialize and return the cached data.
// unserialize and return the cached data.
if ($cache->serialized) { if ($cache->serialized) {
$cache->data = unserialize($cache->data); $cache->data = unserialize($cache->data);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment