MDL-39312 cache: interfaces for managing lock instances.
Bug: There was no way to create an instance of a lock plugin for use within Moodle. Solution: Implemented management interfaces as part of cache/admin.php to allow for instances to be added and deleted. This was done in along the same lines of adding store instances.
This commit is contained in:
Vendored
+10
@@ -541,6 +541,16 @@ class cache_config {
|
||||
return $this->configlocks[$lock];
|
||||
}
|
||||
}
|
||||
return $this->get_default_lock();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the default lock instance.
|
||||
*
|
||||
* @return array
|
||||
* @throws cache_exception
|
||||
*/
|
||||
public function get_default_lock() {
|
||||
foreach ($this->configlocks as $lockconf) {
|
||||
if (!empty($lockconf['default'])) {
|
||||
return $lockconf;
|
||||
|
||||
Reference in New Issue
Block a user