I use diskcache to persist my data. I save users cache.add(key=k, value=v, tag="users")
, now i want to get all users by tag
, but there is no such method.
How i can do this?
I've found only one way to do this:
def _get_all(self):
r = []
for k in list(self._cache.iterkeys()):
r.append(self._cache.get(key=k))
But this way does not assume tag as argument, so i can not persist in 1 diskcache instance different items and filter them by tag.