Browse files

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
  • Loading branch information...
1 parent 233046e commit 86afa1d00fb457102eedee3faa1ace9c976f7930 @scara scara committed with Sam Hemelryk Dec 2, 2012
View
11 cache/stores/memcache/lib.php
@@ -324,6 +324,17 @@ 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() {
+ $this->cleanup();
+ }
+
+ /**
* Generates an instance of the cache store that can be used for testing.
*
* @param cache_definition $definition
View
11 cache/stores/memcached/lib.php
@@ -406,6 +406,17 @@ 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() {
+ $this->cleanup();
+ }
+
+ /**
* Generates an instance of the cache store that can be used for testing.
*
* @param cache_definition $definition
View
11 cache/stores/mongodb/lib.php
@@ -444,6 +444,17 @@ 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() {
+ $this->cleanup();
+ }
+
+ /**
* Generates an instance of the cache store that can be used for testing.
*
* @param cache_definition $definition
View
11 cache/stores/session/lib.php
@@ -380,6 +380,17 @@ 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() {
+ $this->cleanup();
+ }
+
+ /**
* Generates an instance of the cache store that can be used for testing.
*
* @param cache_definition $definition
View
11 cache/stores/static/lib.php
@@ -377,6 +377,17 @@ 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() {
+ $this->cleanup();
+ }
+
+ /**
* Generates an instance of the cache store that can be used for testing.
*
* @param cache_definition $definition

0 comments on commit 86afa1d

Please sign in to comment.