Wednesday 22 February 2006 5:36:39 am
Hi, I am looking forward to activate static caching on a high-traffic website, and had some questions for those who are experienced in its use so to avoid problems later. All of this revolves around the use of navigator/google.tpl which caused me some cache-related problems when I used it on earlier projects. maybe these can be avoided with a cleverer design springing up from your suggestions :-) I have some override templates for specific folders which list their content as a formatted list. for big amounts of items, this list is paged - so google.tpl serves just this purpose. the google.tpl include is placed at the end of the "full" override template for the folder. let's suppose I have 2 of these list folders accessible at /foo/list1 and /foo/list2. When I have viewcaching, contentcaching, templatecompile and templatecaching on, and I access /foo/list1, google.tpl generates links like /foo/list1/(offset)/10, /foo/list1/(offset)/20, etc. so far, so good! however, when I access /foo/list2, google.tpl will generate links like /foo/list1/(offset)/10 and so on. thus using the first accessed node , list1 , as a base. eek!. I don't know whether this is connected to ViewCaching or to TemplateCompile or TemplateCaching, but let's say I worked around this, by using cache-blocks and leaving the google.tpl out of them. So, now I have a site which is working with "regular" caching, at the expense of the need to use some tricks (disable cache, enable cache for all tpl save the google.tpl and so ) Now I want to use static cache. by definition, static cache generator renders all the full templates of all content nodes. Enter those folders with big amounts of items and let's assume that the HTML content is correctly generated for all nodes. The problem here is, there are some classes which do not have a full.tpl of their own - but they are meant to be displayed into other templates. my case is an image gallery with some navigators. from a functional and design point of view, it makes sense that the navigator logic and the thumbnails be visible in the template of the gallery node (since the gallery/folder node "knows" its children, while the single image is displayed in a space of this template. But if static cache works as I think it does, I have to turn this structure backwards, and have the override template for the single image-node contain the navigator, and have the override folder for the gallery folder simply not be available for direct view, but redirect somehow to one of it's children node images. I hope I have been clear - so, can anyone share their experience on this? and am I right in thinking so, or am I overlooking something / wrong on something? thanks for your contributions and thoughts, Massimiliano
|