diff --git a/src/agenda_culturel/templates/agenda_culturel/page-day.html b/src/agenda_culturel/templates/agenda_culturel/page-day.html index 75447d9..1f91458 100644 --- a/src/agenda_culturel/templates/agenda_culturel/page-day.html +++ b/src/agenda_culturel/templates/agenda_culturel/page-day.html @@ -24,7 +24,8 @@ {% block content %} {% get_current_language as LANGUAGE_CODE %} - {% cache 500 day user.is_authenticated day filter.to_str LANGUAGE_CODE %} + {% with cache_timeout=user.is_authenticated|yesno:"30,600" %} + {% cache cache_timeout day user.is_authenticated day filter.to_str LANGUAGE_CODE %} {% include "agenda_culturel/filter-inc.html" with filter=filter %} @@ -105,5 +106,6 @@ {% endcache %} +{% endwith %} {% endblock %} \ No newline at end of file diff --git a/src/agenda_culturel/templates/agenda_culturel/page-month.html b/src/agenda_culturel/templates/agenda_culturel/page-month.html index 082b2a1..dc5241c 100644 --- a/src/agenda_culturel/templates/agenda_culturel/page-month.html +++ b/src/agenda_culturel/templates/agenda_culturel/page-month.html @@ -24,7 +24,8 @@ {% block content %} {% get_current_language as LANGUAGE_CODE %} - {% cache 500 month user.is_authenticated calendar.firstdate filter.to_str LANGUAGE_CODE %} + {% with cache_timeout=user.is_authenticated|yesno:"30,600" %} + {% cache cache_timeout month user.is_authenticated calendar.firstdate filter.to_str LANGUAGE_CODE %} {% include "agenda_culturel/filter-inc.html" with filter=filter %} @@ -71,6 +72,7 @@ {% endcache %} +{% endwith %} {% endblock %} \ No newline at end of file diff --git a/src/agenda_culturel/templates/agenda_culturel/page-week.html b/src/agenda_culturel/templates/agenda_culturel/page-week.html index 0c3cde1..b4e4ed5 100644 --- a/src/agenda_culturel/templates/agenda_culturel/page-week.html +++ b/src/agenda_culturel/templates/agenda_culturel/page-week.html @@ -21,7 +21,8 @@ {% block content %} {% get_current_language as LANGUAGE_CODE %} - {% cache 500 week user.is_authenticated calendar.firstdate filter.to_str LANGUAGE_CODE %} + {% with cache_timeout=user.is_authenticated|yesno:"30,600" %} + {% cache cache_timeout week user.is_authenticated calendar.firstdate filter.to_str LANGUAGE_CODE %} {% include "agenda_culturel/filter-inc.html" with filter=filter %} @@ -67,5 +68,6 @@ {% endcache %} - +{% endwith %} + {% endblock %} \ No newline at end of file diff --git a/src/agenda_culturel/templates/agenda_culturel/place_detail.html b/src/agenda_culturel/templates/agenda_culturel/place_detail.html index 1902a68..ada783e 100644 --- a/src/agenda_culturel/templates/agenda_culturel/place_detail.html +++ b/src/agenda_culturel/templates/agenda_culturel/place_detail.html @@ -64,7 +64,8 @@ {% get_current_language as LANGUAGE_CODE %} - {% cache 500 place_list user.is_authenticated object %} + {% with cache_timeout=user.is_authenticated|yesno:"30,600" %} + {% cache cache_timeout place_list user.is_authenticated object %} {% if object_list %}