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

⚡️(api) add cache to prevent excessive drain from /stats endpoint #660

Closed
wants to merge 1 commit into from

Conversation

mjeammet
Copy link
Member

@mjeammet mjeammet commented Jan 22, 2025

Purpose

stats endpoint is currently public and without cache. As it makes several queries to the database, we want to add a cache to prevent excessive drain

Proposal

Description...

  • added cache
  • added a test, out of curiosity

stats endpoint is currently public and without cache. As it makes several
queries to the database, we want to add a cache to prevent excessive drain
Copy link
Collaborator

@sylvinus sylvinus left a comment

Choose a reason for hiding this comment

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

LGTM

@mjeammet mjeammet closed this Jan 27, 2025
@mjeammet mjeammet deleted the mpj/cache-stats branch January 27, 2025 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cache stats/ endpoint to avoid too many requests to database
2 participants