Page 1 of 1

Caching with Smarty

Posted: Mon Aug 11, 2008 6:36 pm
by peter2108
I searched the forums and around an now understand that Smarty will cache pages if you ask it to but that CMSMS has decided to bypass this option as apparently it did not speeds things up much if at all and anyway makes things more complicated (this is not compiled templates of course CMSMS lets Smarty do that)

Well am I right? Is page caching permanently switched off? The stuff I found was pretty old.

Thanks

Peter

Re: Caching with Smarty

Posted: Mon Aug 11, 2008 10:03 pm
by Dr.CSS
Page caching is option in page, but it is caching by default...

Re: Caching with Smarty

Posted: Tue Aug 12, 2008 3:52 pm
by Pierre M.
Yes, "complicated" because of variable settings, parameters, etc. CMSms 1.x bypasses Smarty's caching but has its own caching (as Mark has said). From 1.4 CSS are cached too.
CMSms 2.0 has a new "full page caching" feature. May be near what you would get with Smarty's one.

If your care very much on caching, you may try Apache's mod_cache after headers/expires tuning.

Pierre M.

Re: Caching with Smarty

Posted: Thu Aug 14, 2008 8:38 pm
by peter2108
Thank very much for this. I have just started with CMSMS and am trying to see how it uses Smarty.  I don't know what cache CMSMX 1.x does apart from templates_c which is Smarty. But there is a file called 'contentcache.php' but I don't know what that is for at all.  Anyway thanks again. I did not understand Marks post ...

Re: Caching with Smarty

Posted: Thu Aug 14, 2008 9:34 pm
by Dr.CSS
You can set a page to not be cached, good for FEU logins etc. in the options tab when making/editing pages...

The file in tmp/cache is for your menu/page hierarchy and will be rebuilt if you delete it...

Re: Caching with Smarty

Posted: Fri Aug 15, 2008 1:35 am
by Ted
contentcache.php is a serialized object that holds the content hierarchy so that it doesn't have to be rebuilt on every page request.  If you unserialized it, it would basically be a filled up Tree object (lib/Tree/Tree.php).

Re: Caching with Smarty

Posted: Fri Aug 15, 2008 9:05 am
by peter2108
Thanks - I up to speed here then. I really like CMSMS because it promises to be intelligible. I think this is in part because it encapsulates function inside Smarty which is a different system (like function is encapsulated within the DBMS). Many years ago I read a book called "Sciences of the Artificial"(1972)  where the author H.A. Simon argued that intelligible systems had to be 'almost decomposable' which meant that the interactions between components were far fewer and weaker than the interactions within components. I think he was right and that CMSMS achieves this far better than other cms type systems I have looked at (though I am not an expert on cms or php for hat matter). Anyway don't know why I'm rambling on here. 

-- Peter