Skip to content

Add footer template file caching #6148

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

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions readthedocs/api/v2/templates/restapi/footer.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<!-- Inserted RTD Footer -->
{% load cache %}
{% cache 900 footer %}
Copy link
Member

Choose a reason for hiding this comment

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

This will cache the footer and use the same footer for all the projects. That's not correct. We need to add more keywords where.

Also, adding cache here, even if we use the proper variables/keywords, could cause confusions on users when a new version is activated, a translation is added, etc. So, we may want to invalidate the cache in those cases as well.

<div class="injected">

{% if not new_theme %}
Expand Down Expand Up @@ -140,3 +142,4 @@
{% endif %}

</div>
{% endcache %}