diff --git a/lib/SimpleSAML/Memcache.php b/lib/SimpleSAML/Memcache.php index 9dbbe5f1dfd42d37acf5d78ef6f3b587e2da3664..e83835ed439906c7f837a66510c2cdfbc09927c3 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.