﻿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
13093	cache_page decorator doesn't work on callable classes	Russell Keith-Magee	nobody	"The cache_page() decorator works fine on views, but fails if you use it on a callable class::
{{{
class MyView(object):
    def __call__(self, request):
        return HttpResponse()
}}}

If you try to wrap this view in urls.py ({{{ cache_page(MyView(), 60) }}}), you get an error saying ""MyView doesn't have attribute !__name!__"". cache_page uses the !__name!__ attribute to build a cache key, but classes dont have a !__name!__ attribute. cache_page should also check for !__class!__.!__name!__ (or some similar key with a per-instance feature) to allow for wrapping callable classes.

This is a problem for 1.2, because feed views have been moved to a class-based structure, so it is no longer possible to cache feed views using cache_page().
"		closed	Core (Cache system)	1.2-beta		fixed		Brian Neal	Accepted	0	0	0	0	0	0
