MDL-36363 Added cache_store::instance_created() and cache_store::instance_deleted()
This commit is contained in:
committed by
Sam Hemelryk
parent
b3778a0dec
commit
730cf5acbc
Vendored
+22
@@ -135,6 +135,13 @@ abstract class cache_store implements cache_store_interface {
|
||||
*/
|
||||
abstract public function __construct($name, array $configuration = array());
|
||||
|
||||
/**
|
||||
* Performs any necessary operation when the store instance has been created.
|
||||
*
|
||||
* @link http://tracker.moodle.org/browse/MDL-36363
|
||||
*/
|
||||
public function instance_created() {}
|
||||
|
||||
/**
|
||||
* Returns the name of this store instance.
|
||||
* @return string
|
||||
@@ -225,9 +232,24 @@ abstract class cache_store implements cache_store_interface {
|
||||
|
||||
/**
|
||||
* Performs any necessary clean up when the store instance is being deleted.
|
||||
*
|
||||
* Please note that if the store has been already initialised with
|
||||
* a definition ({@link initialise()}), cleanup will be performed against the scope
|
||||
* of that definition.
|
||||
*
|
||||
* @see instance_deleted()
|
||||
*/
|
||||
abstract public function cleanup();
|
||||
|
||||
/**
|
||||
* Performs any necessary operation when the store instance is being deleted,
|
||||
* regardless the store being initialised with a definition ({@link initialise()}).
|
||||
*
|
||||
* @link http://tracker.moodle.org/browse/MDL-36363
|
||||
* @see cleanup()
|
||||
*/
|
||||
public function instance_deleted() {}
|
||||
|
||||
/**
|
||||
* Returns true if the user can add an instance of the store plugin.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user