Open jojurajan opened 3 years ago
I can't see a good solution for now. I think refactoring create_key_builder to class would be the one of the future.
Instead of overriding the key_refactor method, I added the custom prefix to _key_prefix
value.
In case someone else is looking for this, the gist can be found here
let me keep this issue open to make them customizable. I think this is lack of feature.
I am using
ring.redis==0.7.3
for caching function returns and I need to prefix the cache key based on the environment that code is being deployed.Currently it is not possible to set the
key_refactor
method during runtime because of the waycompose_key
method has been implemented. https://github.com/youknowone/ring/blob/0.7.3/ring/func/base.py#L648Is there a way to specify the
key_refactor
method during runtime without re-implementingcreate_key_builder
locally?