Jaymon / caches

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

new key creation #8

Closed Jaymon closed 2 years ago

Jaymon commented 6 years ago

right now you can set prefix, it would maybe be better to have a version and then use the name of the class, so when you added a new class you wouldn't have to spend time thinking about what to name the key, and then if you wanted to invalidate the cache you could increment version (or prefix if I kept that).

So, basically, the prefix class property would be replaced with version and class name, with the option to override them, I think this could be achieved by adding a version class property, then making an instance prefix @property that combined version and class name. Then a user could override prefix in the child class or just set version.