diff options
author | Evan Prodromou <evan@status.net> | 2010-01-25 18:13:09 -0500 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-01-25 18:13:09 -0500 |
commit | 663e4e02a1b3b1c104c2c3db19e524a486c3d981 (patch) | |
tree | 048e2f67c10f74e3b510646f7b955d45baa49253 /classes/Memcached_DataObject.php | |
parent | 1ab24832960eef698731cf0d3e72fccfa336392d (diff) | |
parent | e26a843caf9f6bb0d11a7128884db235ededcce0 (diff) |
Merge branch 'master' into testing
Conflicts:
lib/queuemanager.php
Diffstat (limited to 'classes/Memcached_DataObject.php')
-rw-r--r-- | classes/Memcached_DataObject.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/classes/Memcached_DataObject.php b/classes/Memcached_DataObject.php index f59213c2c..2cc6377f8 100644 --- a/classes/Memcached_DataObject.php +++ b/classes/Memcached_DataObject.php @@ -510,4 +510,23 @@ class Memcached_DataObject extends DB_DataObject return $dsn; } + + static function blow() + { + $c = self::memcache(); + + if (empty($c)) { + return false; + } + + $args = func_get_args(); + + $format = array_shift($args); + + $keyPart = vsprintf($format, $args); + + $cacheKey = common_cache_key($keyPart); + + return $c->delete($cacheKey); + } } |