zenpy
zenpy copied to clipboard
[Feature Request] zenpy to support cache backends
In the era of distributed systems and cloud-native applications, Storing cache not in process memory but in some external backends like Redis, Memcached, and even databases would be very beneficial. Have you ever considered adding support for cache backends?
A good first step is to abstract the notion of a cache. And then we can implement various implementations of that interface. Let's first analyze how the cache is being
- defined
- implemented
- used And then we can come up with an appropriate abstraction and configuration method.
I would rather start with a problem than with use cases. The problem is that if my application runs in more than one instance then using cache in its current implementation nullifies all benefits and even more it can become a huge headache.
Agreed, so a first step could be abstracting what the current caching system does and then make a "pluggable" replacement system. Have you looked at the internals of the existing cache and considered making an interface-conforming drop in replacement?
I have looked a little bit. Let me take a deeper look to come up with some ideas.