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

Consider using Microsoft.Extensions.Caching.Memory for all caches #5322

Closed
divega opened this issue May 10, 2016 · 2 comments
Closed

Consider using Microsoft.Extensions.Caching.Memory for all caches #5322

divega opened this issue May 10, 2016 · 2 comments
Labels
closed-out-of-scope This is not something that will be fixed/implemented and the issue is closed. type-enhancement

Comments

@divega
Copy link
Contributor

divega commented May 10, 2016

Currently we use Microsoft.Extensions.Caching.Memory for our first level query cache and our own custom caching for all other things across the EF Core stack. Since there is no automatic eviction in our custom caching code it would be possible to make EF consume all memory in caching by just doing enough things in an application, e.g. queries with many different combinations of parameters enter the second level query cache, many models are created dynamically, etc.

@divega
Copy link
Contributor Author

divega commented Dec 14, 2016

Another thing we should consider here is the new explicit compiled query implementation. As far as I understand the delegates returned from the API are bound directly to the compiled query plans, which means that the more distinct compiled queries an application use the more memory will be used that cannot be freed up. We could instead use a unique identifier to point to an entry in the query cache like we do in EF6.

@ajcvickers
Copy link
Contributor

We have done enough here with the changes for 3.0. We can revisit in the future if something else comes up.

@ajcvickers ajcvickers removed this from the Backlog milestone Sep 4, 2019
@ajcvickers ajcvickers added the closed-out-of-scope This is not something that will be fixed/implemented and the issue is closed. label Mar 10, 2022
@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-out-of-scope This is not something that will be fixed/implemented and the issue is closed. type-enhancement
Projects
None yet
Development

No branches or pull requests

4 participants