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

fix: cache page content, not page menus #5170

Merged
merged 2 commits into from
Feb 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 0 additions & 2 deletions ietf/meeting/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3431,7 +3431,6 @@ def interim_request_edit(request, number):
"form": form,
"formset": formset})

@cache_page(60*60)
def past(request):
'''List of past meetings'''
today = timezone.now()
Expand Down Expand Up @@ -3799,7 +3798,6 @@ def proceedings_overview(request, num=None):
'template': template,
})

@cache_page( 60 * 60 )
def proceedings_progress_report(request, num=None):
'''Display Progress Report (stats since last meeting)'''
if not (num and num.isdigit()):
Expand Down
3 changes: 3 additions & 0 deletions ietf/templates/meeting/past.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin %}
{% load ietf_filters static %}
{% load cache %}
{% block pagehead %}
<link rel="stylesheet" href="{% static "ietf/css/list.css" %}">
{% endblock %}
{% block title %}Past Meetings{% endblock %}
{% block content %}
{% cache 3600 pastmeetings %}
Copy link
Member

Choose a reason for hiding this comment

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

Needs {% endcache %}

{% origin %}
<h1>Past Meetings</h1>
{% if meetings %}
Expand Down Expand Up @@ -55,6 +57,7 @@ <h1>Past Meetings</h1>
{% else %}
<h2>No past meetings</h2>
{% endif %}
{% endcache %}
{% endblock %}
{% block js %}
<script src="{% static "ietf/js/list.js" %}"></script>
Expand Down
4 changes: 3 additions & 1 deletion ietf/templates/meeting/proceedings_progress_report.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{% extends "base.html" %}
{% load ams_filters ietf_filters %}
{% load ams_filters ietf_filters cache %}
{% block title %}IETF {{ meeting.number }} Proceedings - Progress Report{% endblock %}
{% block content %}
{% cache 3600 proceedings_progress_report meeting.number %}
Copy link
Member

Choose a reason for hiding this comment

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

Needs {% endcache %}

<h1>
<a class="text-decoration-none text-reset"
href="{% url 'ietf.meeting.views.proceedings' num=meeting.number %}">
Expand Down Expand Up @@ -67,4 +68,5 @@ <h3 class="mt-3">{{ rfcs.count }} RFCs published this period</h3>
</tbody>
{% endif %}
</table>
{% endcache %}
{% endblock %}