diff options
author | Evan Prodromou <evan@status.net> | 2010-01-25 18:10:59 -0500 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-01-25 18:10:59 -0500 |
commit | b6aa1511eb868d740f8893160ce8bef387725867 (patch) | |
tree | a583cfb455da2cd53f6dd27b7cec6ef85cc6894d /classes/Memcached_DataObject.php | |
parent | b3121d09c9dc49579934189fc56a0e0195c673f9 (diff) | |
parent | e26a843caf9f6bb0d11a7128884db235ededcce0 (diff) |
Merge branch 'master' into 0.9.x
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 33645a3e8..43610dddb 100644 --- a/classes/Memcached_DataObject.php +++ b/classes/Memcached_DataObject.php @@ -458,4 +458,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); + } } |