Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 86afa1d00fb457102eedee3faa1ace9c976f7930 1 parent 233046e
@scara scara authored samhemelryk committed
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
Please sign in to comment.
Something went wrong with that request. Please try again.