Skip to content

Commit cc11a4e

Browse files
jonasrauberJonas
authored and
Jonas
committed
fix for #1612
using the never_cache decorator should set `Expires` to now
1 parent 0f6361b commit cc11a4e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

readthedocs/projects/views/public.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from django.http import HttpResponse, HttpResponseRedirect, Http404
1616
from django.shortcuts import get_object_or_404, render_to_response
1717
from django.template import RequestContext
18-
from django.views.decorators.cache import cache_control
18+
from django.views.decorators.cache import never_cache
1919
from django.views.generic import ListView, DetailView
2020

2121
from taggit.models import Tag
@@ -101,7 +101,7 @@ def get_context_data(self, **kwargs):
101101
return context
102102

103103

104-
@cache_control(no_cache=True)
104+
@never_cache
105105
def project_badge(request, project_slug):
106106
"""Return a sweet badge for the project"""
107107
version_slug = request.GET.get('version', LATEST)

0 commit comments

Comments
 (0)