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

Should GetCultureByName be cached #8706

Closed
MatteoPiovanelli-Laser opened this issue Jul 3, 2023 · 0 comments
Closed

Should GetCultureByName be cached #8706

MatteoPiovanelli-Laser opened this issue Jul 3, 2023 · 0 comments
Milestone

Comments

@MatteoPiovanelli-Laser
Copy link
Contributor

return _cultureRepository.Get(cr => cr.Culture == cultureName);

While checking the queries being fired off to the db for #8688 I noticed that for many test pages I had a handful of queries SELECTing a specific CultureRecord, by culture.
Checking around the codebase, my assumption is that those are caused by calls to GetCultureByName. It would be trivial to add a layer of cache to prevent those. Same for GetCultureById. Moreover, the signals to manage eviction of that appear to be already in place, and used in the same manager.

My question to the community and especially (@sebastienros and @BenedekFarkas ) is: do you think this is worth it?
I don't have a chance right now to measure this.

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