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

CacheResource singleton #1

Open
elgransan opened this issue May 17, 2021 · 1 comment
Open

CacheResource singleton #1

elgransan opened this issue May 17, 2021 · 1 comment

Comments

@elgransan
Copy link

Thank you for share, I have a question with the CacheResource Filter

You created a class variable _cacheKey and then registered the class as singleton, could the value been overwritten if 2 or more calls are at the same time? Because singleton shared the same instance object for all the calls.

@geeksarray
Copy link
Owner

The cache should contain the most recent values. Otherwise, cache values will not be valid at the time of actual data processing. If you need multiple copies of caching depending on some other object you can create different cache entries.

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

No branches or pull requests

2 participants