Re: [Twisted-Python] In memory cache in twisted

2019-09-27 Thread meejah
Waqar Khan writes: > But, is the above way of using dictionary as cache correct? Or is > there a "deffered" way of doing this? All I want is an inmemory cache > that is compatible with this async paradigm? Yes, it is fine to use a single dict as a cache. Twisted is single-threaded an so only

Re: [Twisted-Python] In memory cache in twisted

2019-09-27 Thread Ilya Skriblovsky
Hi all, Here is async in-memory cache that I've implemented for one of my projects: https://gist.github.com/IlyaSkriblovsky/5aba53b661acd49b65efeb4ce41a8b52 It properly handles problem #2 described by Maarten. But it doesn't bother with eviction because it wasn't needed at the time of writing