MDL-53208 caching: parse_key not required for static cache.
static cache operates on a single cache instance, it can't share with others and can use the supplied key immediately.
This commit is contained in:
Vendored
+4
-1
@@ -766,13 +766,14 @@ class cache_definition {
|
||||
* Sets the identifiers for this definition, or updates them if they have already been set.
|
||||
*
|
||||
* @param array $identifiers
|
||||
* @return bool false if no identifiers where changed, true otherwise.
|
||||
* @throws coding_exception
|
||||
*/
|
||||
public function set_identifiers(array $identifiers = array()) {
|
||||
// If we are setting the exact same identifiers then just return as nothing really changed.
|
||||
// We don't care about order as cache::make will use the same definition order all the time.
|
||||
if ($identifiers === $this->identifiers) {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach ($this->requireidentifiers as $identifier) {
|
||||
@@ -791,6 +792,8 @@ class cache_definition {
|
||||
// Reset the key prefix's they need updating now.
|
||||
$this->keyprefixsingle = null;
|
||||
$this->keyprefixmulti = null;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user