From 1d64fa367c340dce4872816b8ffebf7850d0cca3 Mon Sep 17 00:00:00 2001 From: Andre D Date: Fri, 24 Aug 2012 12:20:39 -0500 Subject: [PATCH] tdb_cassandra: Add the ability to remove items from views --- r2/r2/lib/db/tdb_cassandra.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/r2/r2/lib/db/tdb_cassandra.py b/r2/r2/lib/db/tdb_cassandra.py index 53936c432..de9b1d960 100644 --- a/r2/r2/lib/db/tdb_cassandra.py +++ b/r2/r2/lib/db/tdb_cassandra.py @@ -1465,6 +1465,12 @@ class View(ThingBase): # can we be smarter here? thing_cache.delete(cls._cache_key_id(row_key)) + + @classmethod + @will_write + def _remove(cls, key, columns): + cls._cf.remove(key, columns) + thing_cache.delete(cls._cache_key_id(key)) class DenormalizedView(View): """Store the entire underlying object inside the View column."""