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

counters for cache stats #5127

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

counters for cache stats #5127

wants to merge 3 commits into from

Conversation

ruslandoga
Copy link
Contributor

@ruslandoga ruslandoga commented Feb 27, 2025

Plausible.Cache.Stats table sometimes causes lock contention under load.
This is an experiment to see if removing that table makes sense.

@ruslandoga ruslandoga mentioned this pull request Feb 27, 2025
defp counter(cache_name, type) do
:persistent_term.get({__MODULE__, cache_name, type}, nil) ||
raise "counter not found for #{cache_name} #{type}"
end
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is all very quick and dirty. The API can be improved if this works out.

Copy link
Member

@aerosol aerosol left a comment

Choose a reason for hiding this comment

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

Love it :)

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.

2 participants