Jaymon / caches

Python caching backed by Redis
MIT License
6 stars 3 forks source link

Add a way to clear all keys with the given prefix #11

Closed Jaymon closed 3 years ago

Jaymon commented 3 years ago

An idea on how to do this here.

Basically, it would be great to do something like this:

class FooCache(KeyCache):
  prefix = "foo"

FooCache.clear_prefix()

and have it clear all foo* keys in the cache