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

Fix repetitive database queries from #30040 #30259

Merged
merged 2 commits into from May 15, 2024

Conversation

JasonPunyon
Copy link
Contributor

This implements a fix for #30250 that Claire described here.

After the changes, a cache miss will happen once every ten minutes and incur just two hits to the db.

The rails log showing two queries to the site_uploads table on a cache miss.

And a cache hit incurs zero hits to the db.

The rails log showing zero queries to the db on a cache hit.

@JasonPunyon JasonPunyon changed the title Fix repetetive database queries from #30040 Fix repetitive database queries from #30040 May 11, 2024
Copy link
Contributor

@ClearlyClaire ClearlyClaire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution!

@ClearlyClaire ClearlyClaire added this pull request to the merge queue May 15, 2024
Merged via the queue into mastodon:main with commit 85c625d May 15, 2024
28 checks passed
@renchap
Copy link
Sponsor Member

renchap commented May 19, 2024

Unless I am mistaken, the cache is not invalidated when a new icon is uploaded?

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 this pull request may close these issues.

None yet

3 participants