Tobias Herp wrote:
Jamie Heilman wrote:
Tobias Herp wrote:
No its not sufficient, you have to actually use the ZCacheable API if you want to benefit from a cache manager. Read the source for another product like PythonScripts or PageTemplates to see examples of how to do it, but more importantly read OFS/Cache.py to see how it actually works.
Ok, after some reading in ZopePageTemplate.py my understanding is as follows:
- when my object changes, ZCacheable_invalidate must be called
- in my index_html, try to get a cached value via ZCacheable_get
- if there is no cacheable value yet, store it via ZCacheable_set
- the keyset to use is a dictionary containing the request variables which are the keys, e.g. { 'language': REQUEST.get('language'), 'template': REQUEST.get('template'), }
Correct? Still missing something?
Just for the records: This works so far :-) Thanks, Tobias