From 8a431c9e4279fc4aa4c9c5b52157634d19470404 Mon Sep 17 00:00:00 2001 From: marcus Date: Mon, 3 Nov 2008 19:58:41 +0000 Subject: * 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 --- engine/lib/api.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'engine/lib/api.php') 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 @@ -236,6 +236,28 @@ return false; } + /** + * 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. * -- cgit v1.2.3