summaryrefslogtreecommitdiff |
diff options
Diffstat (limited to 'src/io/timed_cache.erl')
-rw-r--r-- | src/io/timed_cache.erl | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/io/timed_cache.erl b/src/io/timed_cache.erl index ec58caa..8fa2861 100644 --- a/src/io/timed_cache.erl +++ b/src/io/timed_cache.erl @@ -88,10 +88,21 @@ fetch (DB, Owner, ObjectID) -> end. invalidate (DB, Owner, ObjectID) -> - case ets:lookup(DB, {Owner, ObjectID}) of - [] -> ok; + case ets:lookup(db, {Owner, ObjectID}) of + [] -> + io:format + ( + "~nInvalidation request on non-stored entry: ~p.~n", + [{DB, Owner, ObjectID}] + ), + ok; [{_, TimerPID, _}] -> + io:format + ( + "~nInvalidation request on stored entry: ~p.~n", + [{DB, Owner, ObjectID}] + ), gen_server:stop(TimerPID) end. |