Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One dict for any SimpleMemoryBackend instances. Why is that? #531

Closed
AntonBezdenezhnykh opened this issue Feb 4, 2021 · 1 comment · Fixed by #562
Closed

One dict for any SimpleMemoryBackend instances. Why is that? #531

AntonBezdenezhnykh opened this issue Feb 4, 2021 · 1 comment · Fixed by #562

Comments

@AntonBezdenezhnykh
Copy link

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 AntonBezdenezhnykh changed the title Single instance for SimpleMemoryBackend One dict for any SimpleMemoryBackend instances. Why is that? Feb 4, 2021
@and-semakin
Copy link

and-semakin commented May 5, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants