﻿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
28094	Document how @override_settings(CACHES=...) can work with class-based views	R3turnz	MODI PREXA ALPESH	"The following should override the CACHES setting during tests:
{{{#!python
@method_decorator(cache_page(60 * 5), name='dispatch')
class IndexView(generic.ListView):

if ENABLE_CACHING:
    CACHES = get_cache()
else:
    CACHES = {
        'default': {
            'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
        }
    }

@override_settings(CACHES={'default': {'BACKEND': 'django.core.cache.backends.dummy.DummyCache'}})
class IndexViewTests(TestCase):
}}}
The setting also seems to be correctly overriden, (django.conf.settings contains dummy cache) but I encounter following problems:
* The context of the response is always None.
* Test which formerly passed now fail and view functions are not called.
All problems disappear when I disable caching **manually**!
This leads me to the assumption that the views are stilled cached.
The documentation says that overriding the cache should be possible and I am not using sessions framwork.
I do not have enough knowledge of the architecture of django to do further debugging.
"	Cleanup/optimization	assigned	Documentation	1.11	Normal			Kevin Graves	Accepted	1	0	0	1	0	0
