So Im fine tuning my Plone site, by putting some ram caching on. So i customized two objects about_slot and links_slot (both page templates) and put them in ram cache. I then hit the a page a few times, no hits to the cache, it seems these pages are being rendered every time. Basically lslot is passed through as a string in the main template for each slot, to the following code, so for example here/about_slot/macros/aboutBox. <metal:block use-macro="python:path(lslot)"> This is Zope 2.5.1. Any ideas? -- Andy McKay www.agmweb.ca
Andy McKay wrote:
So Im fine tuning my Plone site, by putting some ram caching on. So i customized two objects about_slot and links_slot (both page templates) and put them in ram cache.
I then hit the a page a few times, no hits to the cache, it seems these pages are being rendered every time.
Basically lslot is passed through as a string in the main template for each slot, to the following code, so for example here/about_slot/macros/aboutBox.
<metal:block use-macro="python:path(lslot)">
This is Zope 2.5.1.
Any ideas?
You can't cache macros, if that's what you mean. Because of the way page template macros work, their execution can't be managed by a cache manager. Entire templates, on the other hand, can be cached. Or did I misunderstand? Shane
You can't cache macros, if that's what you mean. Because of the way page template macros work, their execution can't be managed by a cache manager. Entire templates, on the other hand, can be cached.
Or did I misunderstand?
Thanks Shane, thats the answer I suspected. This really raises the issue then of caching a site. In the old days a page would be made up of DTML objects. It was a simple matter then to profile a page and stick anything that wasnt dynamic into a ram cache. The end result was the home page of ZopeZen.org was 80% ram cached and about 20% dynamic (basically your name and options). This was a very quick, powerful and useful way to increase performance. Unless there's something Im missing about the way Page Templates work, it now means I can either cache my entire template (not possible) or none of it. My only choice is to cache some of the underlying bits such as some Python Scripts. I'll enter a bug in the collector and grumble. -- Andy McKay www.agmweb.ca
participants (2)
-
Andy McKay -
Shane Hathaway