aiocache icon indicating copy to clipboard operation
aiocache copied to clipboard

One dict for any SimpleMemoryBackend instances. Why is that?

Open AntonBezdenezhnykh opened this issue 4 years ago • 1 comments

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.

AntonBezdenezhnykh avatar Feb 04 '21 19:02 AntonBezdenezhnykh

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.

and-semakin avatar May 05 '21 12:05 and-semakin