Caching with Smarty

General project discussion. NOT for help questions.
Post Reply
peter2108
Forum Members
Forum Members
Posts: 10
Joined: Sat Feb 09, 2008 10:23 am
Location: Wakefield, UK

Caching with Smarty

Post 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
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Caching with Smarty

Post by Dr.CSS »

Page caching is option in page, but it is caching by default...
Pierre M.

Re: Caching with Smarty

Post 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.
peter2108
Forum Members
Forum Members
Posts: 10
Joined: Sat Feb 09, 2008 10:23 am
Location: Wakefield, UK

Re: Caching with Smarty

Post 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 ...
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Caching with Smarty

Post 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...
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm
Location: Fairless Hills, Pa USA

Re: Caching with Smarty

Post 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).
peter2108
Forum Members
Forum Members
Posts: 10
Joined: Sat Feb 09, 2008 10:23 am
Location: Wakefield, UK

Re: Caching with Smarty

Post 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
Post Reply

Return to “General Discussion”