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

feat: add query level cache logic #311

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

loadez
Copy link
Collaborator

@loadez loadez commented Sep 16, 2024

Creates the basic logic for caching database queries, currently it will only be applied to the slowest query.

Test by going to a tree details page and filtering the tests or boots tabs, the first load should be normal but any other filtering by status should be faster.

Closes: #301

@loadez loadez self-assigned this Sep 16, 2024
@loadez loadez marked this pull request as draft September 17, 2024 11:53
@loadez loadez marked this pull request as ready for review September 17, 2024 13:25
from datetime import timedelta
import re

DEFAULT_QUERY_TIME_INTERVAL = {'days': 7}
DEFAULT_QUERY_CACHE = 180
Copy link
Collaborator

Choose a reason for hiding this comment

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

this should be an env var right?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think in debug this should be 0 also

Copy link
Collaborator

@lfjnascimento lfjnascimento left a comment

Choose a reason for hiding this comment

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

Big win, working beautifully!

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.

Add query level caching
3 participants