-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Performance improvement: cache version listing on the homepage #4526
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
Conversation
This is similar to #4524, where resolving a ton of URL's for versions is time consuming. This limits that by only listing the stable version, if it exists, for featured projects on our homepage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm surprised we haven't done this yet. 👍
readthedocs/templates/homepage.html
Outdated
@@ -116,6 +116,7 @@ <h3>Multiple versions</h3> | |||
</section> | |||
|
|||
{% if featured_list %} | |||
{% cache 600 homepage %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The identifier should probably be more specific, ie: homepage_featured_list
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! We could use something similar to get the number of projects as well but if this takes care of it, no worries.
This is similar to #4524,
where resolving a ton of URL's for versions is time consuming.
This caches the features projects list on the homepage.