aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/api.php
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-11-03 19:58:41 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-11-03 19:58:41 +0000
commit8a431c9e4279fc4aa4c9c5b52157634d19470404 (patch)
tree96d2cb38b65b9256ae3db2e2c61b5f4083f5e051 /engine/lib/api.php
parent62f75374c1792c43a515a1696e6d88cb41dc605f (diff)
downloadelgg-8a431c9e4279fc4aa4c9c5b52157634d19470404.tar.gz
elgg-8a431c9e4279fc4aa4c9c5b52157634d19470404.tar.bz2
* ElggCache interface improved
* ElggStaticVariableCache introduced as a placeholder for more advanced caching. git-svn-id: https://code.elgg.org/elgg/trunk@2384 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/api.php')
-rw-r--r--engine/lib/api.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/engine/lib/api.php b/engine/lib/api.php
index 4ca9e208c..198f3efb0 100644
--- a/engine/lib/api.php
+++ b/engine/lib/api.php
@@ -237,6 +237,28 @@
}
/**
+ * Invalidate a given key.
+ *
+ * @param string $key
+ * @return bool
+ */
+ public function delete($key)
+ {
+ global $CONFIG;
+
+ $key = sanitise_string($key);
+
+ return delete_data("DELETE from {$CONFIG->dbprefix}hmac_cache where hmac='$key'");
+ }
+
+ /**
+ * Clear out all the contents of the cache.
+ *
+ * Not currently implemented in this cache type.
+ */
+ public function clear() { return true; }
+
+ /**
* Clean out old stuff.
*
*/