From a5ff98afb3487dadec9fcf010c78cd81819e9250 Mon Sep 17 00:00:00 2001 From: Rodrigo Landerdahl Date: Wed, 21 Sep 2016 22:43:29 -0300 Subject: [PATCH] fix: Cache invalidation on field update. --- src/boss_db_cache.erl | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/boss_db_cache.erl b/src/boss_db_cache.erl index 75c51430..ec0f7381 100644 --- a/src/boss_db_cache.erl +++ b/src/boss_db_cache.erl @@ -16,11 +16,5 @@ handle_collection_news(updated, {_Record, Attr, _OldVal, _NewVal}, {Prefix, Key} boss_cache:delete(Prefix, Key), {ok, cancel_watch}; handle_collection_news(updated, {_Record, Attr, _OldVal, _NewVal}, {Prefix, Key}) -> - Conditions = element(2, Key), - case proplists:lookup(Attr, Conditions) of - none -> - ok; - _ -> - boss_cache:delete(Prefix, Key), - {ok, cancel_watch} - end. + boss_cache:delete(Prefix, Key), + {ok, cancel_watch}.