From 1bd0844b86b373813264c0d179e8e91d70036724 Mon Sep 17 00:00:00 2001
From: Olav Morken <olav.morken@uninett.no>
Date: Mon, 9 Aug 2010 08:50:54 +0000
Subject: [PATCH] Memcache: Add delete method.
git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2489 44740490-163a-0410-bde0-09ae8108e29a
---
lib/SimpleSAML/Memcache.php | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/lib/SimpleSAML/Memcache.php b/lib/SimpleSAML/Memcache.php
index 9dbbe5f1d..e83835ed4 100644
--- a/lib/SimpleSAML/Memcache.php
+++ b/lib/SimpleSAML/Memcache.php
@@ -137,6 +137,21 @@ class SimpleSAML_Memcache {
}
+ /**
+ * Delete a key-value pair from the memcache servers.
+ *
+ * @param string $key The key we should delete.
+ */
+ public static function delete($key) {
+ assert('is_string($key)');
+
+ /* Store this object to all groups of memcache servers. */
+ foreach(self::getMemcacheServers() as $server) {
+ $server->delete($key);
+ }
+ }
+
+
/**
* This function adds a server from the 'memcache_store.servers'
* configuration option to a Memcache object.
--
GitLab