Database templates vs File Templates

General project discussion. NOT for help questions.
Post Reply
rmelberg

Database templates vs File Templates

Post by rmelberg »

I am kind of new to CMSMS, but have used Smarty pretty extensively, and I would like to know the performance implications of using Database Templates vs file templates.  I used the News Module as an example and implemented database templates, but the code seems to indicate that database templates are not cached, which seems to negate some of the benefits of Smarty.  If anyone has any insights into this issue, or if you have suggestions of where to look for examples of how to handle editable templates in a performant manner, it would be much appreciated.

Thanks,
Rorik
Pierre M.

Re: Database templates vs File Templates

Post by Pierre M. »

Hello Rorik,

warning : I know Smarty only by name. It runs under the cover of CMSms. Any CMSms user can build websites without knowing Smarty is powering them. Because CMSms is a user and content management on top of Smarty. The persistence of everything managed in CMSms is the database. This is why groups, users, permissions, pages, menus, templates, CSS, User Defined Tags, Global Content Blocks, etc are all stored in the database.

I used to ask the same question as you when I had discovered that this Smarty-Thing has caching features. The answer of the devteam was that some customizations (especially modules) were unfortunately uncompatible with "export tree" caching. As new versions of Smarty (or another compatible lighter template engine) are used this may be less an issue (though I bet there is still a gap). But CMSms v2.0 is designed with its own full page caching feature : managed content is generated once by the template engine and then broadcasted by the caching layer.

And as I like to claim, everybody is free to enable mod_cache at the webserver level ;)

Pierre M.
rmelberg

Re: Database templates vs File Templates

Post by rmelberg »

I guess what I meant to ask is if the database smarty templates are compiled and cached just like the file smarty templates are.  I checked by deleting all of my compiled templates (templaes_c) and refreshing.  Sorry, stupid question.

Rorik
Last edited by rmelberg on Sat Aug 18, 2007 7:52 pm, edited 1 time in total.
Post Reply

Return to “General Discussion”