Closed jqnatividad closed 2 years ago
hey @jqnatividad , I added an option to the redis builders so you can specify the cache namespace here https://github.com/jaemk/cached/blob/09632ed855462a5a5452b11d30424095d86479cb/src/stores/redis.rs#L77
The cache key construction logic doesn't add any implicit delimiters between namespace/prefix/key so if you want there to be no namespace or no prefix, then you can pass empty strings to the two builder methods (this is also mentioned in the docs of those methods).
released in 0.33.0 (along with your two dependency updates)
Thanks @jaemk ! Works perfectly!
RedisStore
in 0.32 works like a dream! However, the keys seem to be inordinately long.Currently, all keys have a namespace prefix of "cached-redis-store". And even if I set a prefix, it's just appended to "cached-redis-store".
Can we make the namespace prefix shorter, say "crs". Also, if I set my own prefix, can it be the namespace on its own and not be appended to a hardcoded prefix?