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

Cached queries #59

Merged
merged 1 commit into from
Aug 6, 2024
Merged

Cached queries #59

merged 1 commit into from
Aug 6, 2024

Conversation

gagalago
Copy link
Contributor

@gagalago gagalago commented Aug 1, 2024

What is the purpose of this pull request?

sometimes Rails cache queries, so even if they are performed many times, in practice, they go only once to the database other stay in the Rails process. In that case, we can ignore to count them as they are close to free.

we can configure the cache of queries that way in rails: https://guides.rubyonrails.org/configuring.html#configuring-query-cache

What changes did you make? (overview)

I added an option to ignore cached queries (false by default).

corresponding code in rails that generate these events: ActiveRecord::QueryCache

Is there anything you'd like reviewers to focus on?

Naming of variables is always hard.

Checklist

  • I've added tests for this change
  • I've added a Changelog entry
  • I've updated a documentation

@gagalago gagalago force-pushed the cached_queries branch 3 times, most recently from b1a92e2 to 17ebefe Compare August 1, 2024 14:34
@gagalago gagalago marked this pull request as ready for review August 2, 2024 09:42
@palkan
Copy link
Owner

palkan commented Aug 6, 2024

Looks good. Thanks!

@palkan palkan merged commit 3f457a5 into palkan:master Aug 6, 2024
6 of 7 checks passed
@palkan
Copy link
Owner

palkan commented Aug 6, 2024

Released in 0.7.2

@gagalago
Copy link
Contributor Author

gagalago commented Aug 8, 2024

thanks a lot

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