From 667e5e5ecee7d461fb48d6db3d0b27cdb8b3b887 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Mon, 14 Feb 2011 17:13:19 +0100 Subject: [PATCH] [entropy.db] EntropyRepositoryCacher add keys() --- libraries/entropy/db/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libraries/entropy/db/__init__.py b/libraries/entropy/db/__init__.py index e19cf4026..72d38b8f6 100644 --- a/libraries/entropy/db/__init__.py +++ b/libraries/entropy/db/__init__.py @@ -79,6 +79,12 @@ class EntropyRepositoryCacher(Singleton): except KeyError: pass + def keys(self): + """ + Return a list of available cache keys + """ + return list(self.__live_cache.keys()) + def discard(self, key): """ Discard all the cache items with hash table key starting with "key".