MDL-41997 cache: dummy store now uses static acceleration for session + request
This commit is contained in:
Vendored
+1
-1
@@ -823,7 +823,7 @@ class cache_definition {
|
||||
// Request caches should never use static acceleration - it just doesn't make sense.
|
||||
return false;
|
||||
}
|
||||
return $this->staticacceleration || $this->mode === cache_store::MODE_SESSION;
|
||||
return $this->staticacceleration;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Vendored
+6
-1
@@ -113,7 +113,12 @@ class cachestore_dummy extends cache_store {
|
||||
// store things in its static array.
|
||||
// - If the definition is not using static acceleration then the cache loader won't try to store anything
|
||||
// and we will need to store it here in order to make sure it is accessible.
|
||||
$this->persist = !$definition->use_static_acceleration();
|
||||
if ($definition->get_mode() !== self::MODE_APPLICATION) {
|
||||
// Neither the request cache nor the session cache provide static acceleration.
|
||||
$this->persist = true;
|
||||
} else {
|
||||
$this->persist = !$definition->use_static_acceleration();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user