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

Add 12 hour cache to stats endpoint #1416

Merged
merged 5 commits into from
Jan 27, 2023
Merged

Add 12 hour cache to stats endpoint #1416

merged 5 commits into from
Jan 27, 2023

Conversation

jjnesbitt
Copy link
Member

@jjnesbitt jjnesbitt commented Dec 22, 2022

Closes #1412

Notably, this doesn't actually change how the stats are computed, it just adds a cache. Using the asset paths models to compute this results in a slightly different value than we have now. Rather than try to determine what course of action we should take (a behavior change), I just wanted to get the difference making optimization in.

@waxlamp
Copy link
Member

waxlamp commented Jan 27, 2023

@AlmightyYakob, is this ready for review or are there still pending tasks before it can be moved out of draft mode?

@jjnesbitt jjnesbitt changed the title Optimize stats endpoint Add 12 hour cache to stats endpoint Jan 27, 2023
@jjnesbitt jjnesbitt marked this pull request as ready for review January 27, 2023 17:38
@jjnesbitt
Copy link
Member Author

@waxlamp It's now good to go

Copy link
Contributor

@danlamanna danlamanna left a comment

Choose a reason for hiding this comment

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

Is there already a configured cache backend?

@jjnesbitt
Copy link
Member Author

Is there already a configured cache backend?

The default is local memory caching. Do you think we should use a DB cache instead?

@jjnesbitt
Copy link
Member Author

Note: Since we're using a db cache, we'll need to run python manage.py createcachetable manually once, after this is deployed.

@jjnesbitt jjnesbitt added patch Increment the patch version when merged release Create a release when this pr is merged labels Jan 27, 2023
@jjnesbitt jjnesbitt merged commit 6d631e6 into master Jan 27, 2023
@jjnesbitt jjnesbitt deleted the optimize-stats branch January 27, 2023 20:33
@dandibot
Copy link
Member

🚀 PR was released in v0.3.13 🚀

@dandibot dandibot added the released This issue/pull request has been released. label Jan 27, 2023
@jjnesbitt
Copy link
Member Author

Note: Since we're using a db cache, we'll need to run python manage.py createcachetable manually once, after this is deployed.

This has been successfully performed.

@waxlamp
Copy link
Member

waxlamp commented Jan 31, 2023

Note: Since we're using a db cache, we'll need to run python manage.py createcachetable manually once, after this is deployed.

This has been successfully performed.

@AlmightyYakob, can you update the documentation to explain how and when to carry out this step?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Increment the patch version when merged release Create a release when this pr is merged released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optimize/cache stats endpoint
4 participants