MDL-36363 Override instance_deleted() for all cache stores performing just a cleanup() when this action successfully applies over all the definitions of the cache store

This commit is contained in:
Matteo Scaramuccia
2013-01-28 10:39:23 +13:00
committed by Sam Hemelryk
parent 56e65baa1e
commit 59ca73ff82
5 changed files with 55 additions and 0 deletions
+11
View File
@@ -323,6 +323,17 @@ class cachestore_memcache extends cache_store implements cache_is_configurable {
$this->purge();
}
/**
* 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() {
$this->cleanup();
}
/**
* Generates an instance of the cache store that can be used for testing.
*
+11
View File
@@ -405,6 +405,17 @@ class cachestore_memcached extends cache_store implements cache_is_configurable
$this->purge();
}
/**
* 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() {
$this->cleanup();
}
/**
* Generates an instance of the cache store that can be used for testing.
*
+11
View File
@@ -443,6 +443,17 @@ class cachestore_mongodb extends cache_store implements cache_is_configurable {
$this->purge();
}
/**
* 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() {
$this->cleanup();
}
/**
* Generates an instance of the cache store that can be used for testing.
*
+11
View File
@@ -379,6 +379,17 @@ class cachestore_session extends session_data_store implements cache_is_key_awar
$this->purge();
}
/**
* 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() {
$this->cleanup();
}
/**
* Generates an instance of the cache store that can be used for testing.
*
+11
View File
@@ -376,6 +376,17 @@ class cachestore_static extends static_data_store implements cache_is_key_aware
$this->purge();
}
/**
* 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() {
$this->cleanup();
}
/**
* Generates an instance of the cache store that can be used for testing.
*