Closed blarralde closed 6 years ago
No, there isn't a way to do this directly with readthis. You can access the redis pool directly using the with
method on Rails.cache
, but this is a very application specific way of doing things.
I've written about this a fair bit in the past:
https://sorentwo.com/2015/08/10/efficient-redis-caching-through-hashing.html https://sorentwo.com/2015/08/17/reconstructing-payloads-with-lua.html
Ultimately cache expiration and nested associations proved difficult to generalize. You may be interested in Knuckles for performant caching with arbitrary associations and distinct expiration.
Hey there,
Is there a way to configure readthis to use hashes instead of strings as described here? https://redis.io/topics/memory-optimization#using-hashes-to-abstract-a-very-memory-efficient-plain-key-value-store-on-top-of-redis
Thanks, Ben