Jump to content

CMS and server-side chaching of the menu


doebaladoo

Recommended Posts

I'm busy creating a CMS but am in doubt about how to implement server-side caching of the pages. (The contect might change often, but the menu would be more unlikely to be changed frequently).

 

If every page is cached by itsself, even a small operation in the menu (like editing a menu title) must edit EVERY page in the website.

 

However, not caching the menu might cause high server loads.

 

Is there a way in between (I'm thinking about caching the menu for pages that share the same menu, but am not sure on how to implement that)?

 

Has anyone experienced this problem before? And if so, what was you solution?

Check out Smarty...it's a PHP templating engine and was designed for pretty much the exact reason you describe. It has features built right into it for caching.

 

You can also do a simple include. So put the menu that is used on every page into an include, and update that include whenever the menu is changed.

 

edit: forgot the link: http://www.smarty.net

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.