[TYPO3-dev] set_no_cache is bad. What's next?

Christian Kuhn lolli at schwarzbu.ch
Sun Nov 1 21:34:53 CET 2009


Hey.

Martin Kutschker wrote:
> David Bruchmann schrieb:
>> I've one Extension with several plugins. The cHash is build for all
>> together I think and the result isn't correct. How can I force that each
>> plugin is cached separately and that content of several plugins isn't
>> merged in one cHash?
> 
> TYPO3 caches pages *, not plugins.

We have hacked up an extension to provide caching for plugin content
elements, based on the 4.3 caching framework:

- Useful if you have sites with lots of plugins on pages, that need to
kill the page cache often, because some elements need to be recalculated
(eg. "hotlists" like "most clicked news in last 20 minutes")
- If other plugins are expensive it's nice to get valid cache entries
for them and just recalculate the hotlist
- You still have the overhead of default page setup foo (TS rendering
and such)
- You can avoid USER_INT's this way if it's ok for your plugins to be
rendered only every five minutes or so.
- You can reuse content element cache entries if you place plugins on
different pages (if their plugin configuration is identical). So, if a
plugin is rendered on one page, it's cache entry will be re-used on
another page.

There are some dependencies and pitfalls but it looks good so far (we
easily save half the render time of a page if most elements are
retrieved from content cache). If this approach proves to be working for
us in production, we will release the cache extension together with a
fine grained analytics BE module.

Happy hacking
Christian




More information about the TYPO3-dev mailing list