MDL-36363 Added cache_store::instance_created() and cache_store::instance_deleted()

This commit is contained in:
Matteo Scaramuccia
2013-01-28 10:39:22 +13:00
committed by Sam Hemelryk
parent b3778a0dec
commit 730cf5acbc
2 changed files with 31 additions and 0 deletions
+22
View File
@@ -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.
*