Allow class based view 'cache_timeout' to control middleware.
|Reported by:||rob@…||Owned by:||nobody|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Allow cache timeout to be controlled by an attribute ('cache_timeout') on class based views. This allows cache timeout to be controlled on groups of views with inheritance (or mixins) without having to implement settings for each individual view.
It relies on setting the class based view into an attribute of the view function created by View.as_view. This can then be checked for and interrogated in the UpdateCacheMiddleware.