#6: Componentization
- Contents
- Proposed by
- Tom Lazar
- Seconded by
- Justin Ryan
- Proposal type
- Architecture
- Repository branch
- trunk
- State
- draft
Definitions
"five views" are zope3 multi-adapters which run in Zope2, essentially 'view classes' in the Model-View-Controller pattern.
Motivation
Currently, CacheFu isn't aware of Five views and doesn't add headers etc. for their output making the output of Five based templates uncacheable or forcing authors to implement their own custom caching mechanism. Since Plone's development is clearly moving towards adopting Five views it is desirable to add support for those in CacheFu.
Assumptions
It should be possible to adjust the architecture of CacheFu such that add-on products may provide their own policies.
Proposal
Currently this is just a starting point to collectively work out further details.
Implementation
We want a default adapter and a base interface which all content implement. We probably want to adapt something which is already provided by Plone / AT / ATCT, or propose that a new interface be added there.
Various caching policies should probably be implemented as adapters to views which write directly to the headers, or there should be a special adapter which can lookup the caching policy for a given content object. Tom and I discussed splitting this off into a separate z3 component which would be required by CacheFu, but not necessarily by products which provide policy.I (Justin) also think that GenericSetup support is very important for these use cases. It should be easy to modify the base policy for caching for a number of reasons.
Deliverables
to start, doctests for add-on product authors which show how to leverage this technology and ensure it behaves as expected.
Risks
There could be some overhead to adapting each view to override headers, but the order of magnitude performance improvement offered by CacheFu should outweigh this.
Progress log
We had a meeting from about 1-2pm US Central time on Tues, Nov 14 to discuss this.
Participants
Tom Lazar
Justin Ryan
Balasz Ree (Azax)