#10225: Cache middleware does not honor "Cache-Control: no-cache" in request
headers
--------------------------+-------------------------------------------------
Reporter: erny | Owner: nobody
Status: new | Milestone:
Component: Cache system | Version: 1.0
Keywords: | Stage: Unreviewed
Has_patch: 0 |
--------------------------+-------------------------------------------------
How to test:
1. Create or add to views.py:
{{{
import datetime
from django.http import HttpResponse
from django.views.decorators.cache import cache_page
@cache_page(2 * 60)
def cache_test(request):
now = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
txt = u"Fecha/Hora %s" % now
return HttpResponse(txt, 'text/plain')
}}}
2. Create or add to urls.py:
{{{
from django.conf.urls.defaults import patterns
urlpatterns = patterns(
'',
(r'^cache_test$', 'views.cache_test'),
)
}}}
3. Include in `settings.py` your backend (I use memcache):
{{{
CACHE_BACKEND = 'memcached://localhost:11211/
}}}
4. Run development server: `./manage.py runserver`
5. Open Firefox and get URL: `http://localhost/cache_test`. The current
date/time should appear.
6. Press Ctrl-F5 in the browser to force reload. The same text as in step
5. appears, instead of the current date/time.
--
Ticket URL: <http://code.djangoproject.com/ticket/10225>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---