﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
10225	"Cache middleware does not honor ""Cache-Control: no-cache"" in request headers"	erny	nobody	"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.
"	Uncategorized	closed	Core (Cache system)	1.0	Normal	invalid		hv@…	Accepted	0	0	0	0	0	0
