Solgema/Solgema.fullcalendar — pull request #2 by weberlar (2012-01-11 18:18:13+00:00)
Title: Prevent that all pages turn into BaseActionView and thereby become non-cacheable.

Hey,

trying to figure out why all of our pages returned "Pragma = no-cache" in their HTTP-headers we noticed that only instances with Solgema.fullcalendar installed had this problem. Looking closer I found out that SolgemaFullcalendarActionGuards.is_calendar_layout() was beeing called (three times) for every page view. (Two of the calls were triggered by references to the "available_expr" registered in actions.xml in the default profile.) SolgemaFullcalendarActionGuards however derives from BaseActionView which in turn sets "Pragma = no-cache" for the response in it's __init__() method. This is not a good thing to do for every viewed page :(

My fix just changes the super class of SolgemaFullcalendarActionGuards to BrowserView... which at least helps in the basic situations I tested. I didn't do excessive code reading or testing however, so it's possible that there is a more general design problem and that a similiar bug will be triggered in other ways, too.