aiocache
aiocache copied to clipboard
One dict for any SimpleMemoryBackend instances. Why is that?
Hello, I'm trying to use several memory caches for different functions. And I found that SimpleMemoryBackend uses only one dict for all instances. I'm curious why is that? What are underwater stones there? It looks easy to start using separate dicts for each SimpleMemoryBackend instance.
Agree. This behavior is confusing, especially in tests when you receive some unexpected data in the cache that was put there by a previous test. It becomes difficult to write isolated tests that do some assertions about cache.