Skip to content

Commit 83da8d3

Browse files
authored
Merge pull request #4526 from rtfd/hide-project-versions
Performance improvement: cache version listing on the homepage
2 parents ddf1ef8 + edd7f76 commit 83da8d3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

readthedocs/templates/homepage.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
{% load i18n %}
44
{% load humanize %}
55
{% load pagination_tags %}
6+
{% load cache %}
67

78
{% block extra_metas %}
89
<meta name="description" content="{% trans "Read the Docs simplifies technical documentation by automating building, versioning, and hosting for you. Build up-to-date documentation for the web, print, and offline use on every version control push automatically." %}">
@@ -116,6 +117,7 @@ <h3>Multiple versions</h3>
116117
</section>
117118

118119
{% if featured_list %}
120+
{% cache 600 homepage_featured_list %}
119121
<!-- BEGIN projects list -->
120122
<section>
121123
<h3>{% trans "Featured Projects" %}</h3>
@@ -128,6 +130,7 @@ <h3>{% trans "Featured Projects" %}</h3>
128130
</div>
129131
</section>
130132
<!-- END projects list -->
133+
{% endcache %}
131134
{% endif %}
132135

133136
<!-- Funding and Contributing -->

0 commit comments

Comments
 (0)