Skip to content

Commit

Permalink
fix: cache page content, not page menus (#5170)
Browse files Browse the repository at this point in the history
* fix: cache page content, not page menus

* fix: close the new cache tags
  • Loading branch information
rjsparks committed Feb 21, 2023
1 parent 6a3694e commit 0ce2b8e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
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 %}
{% 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 %}
<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 %}

0 comments on commit 0ce2b8e

Please sign in to comment.