return (!empty($this->definition));
}
- /**
- * Returns true if this is ready.
- * @return bool
- */
- public function is_ready() {
- return true;
- }
-
/**
* Returns true the given mode is supported.
* @param int $mode
}
/* @var cache_store $store */
$store = $this->stores[$name];
- if (!$store::are_requirements_met() || !$store->is_ready() || !$store->is_supported_mode($definition->get_mode())) {
+ if (!$store->is_ready() || !$store->is_supported_mode($definition->get_mode())) {
return false;
}
// We always create a clone of the original store.
// Found the store: is it ready?
/* @var cache_store $instance */
$instance = new $class($store['name'], $store['configuration']);
- if (!$instance::are_requirements_met() || !$instance->is_ready()) {
+ if (!$instance->is_ready()) {
unset($instance);
return false;
}
* Returns true if this cache store instance is ready to use.
* @return bool
*/
- abstract public function is_ready();
+ public function is_ready() {
+ return self::are_requirements_met();
+ }
/**
* Retrieves an item from the cache store given its key.
return (is_array($this->store));
}
- /**
- * Returns true if this store instance is ready to be used.
- * @return bool
- */
- public function is_ready() {
- return true;
- }
-
/**
* Retrieves an item from the cache store given its key.
*
return (is_array($this->store));
}
- /**
- * Returns true if this store instance is ready to be used.
- * @return bool
- */
- public function is_ready() {
- return true;
- }
-
/**
* Retrieves an item from the cache store given its key.
*
This files describes API changes in /cache/stores/* - cache store plugins.
Information provided here is intended especially for developers.
+=== 2.7 ===
+* cache_store::is_ready is no longer abstract, calling cache_store::are_requirements_met by default.
+
=== 2.6 ===
* All cache instances are recorded and subsequent requests are given a reference to the original instance.
* The persistent option for the cache definition has been deprecated. Please use the staticacceleration option instead.