Template Caching

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
Charles256
DevNet Resident
Posts: 1375
Joined: Fri Sep 16, 2005 9:06 pm

Template Caching

Post by Charles256 »

So I am writing my own template class. I've gotten to the point of adding in external css, inline css, external and inline javascript, title, doctype, body, a set footer, all the good basics essentially. The next issue I come up to is the issue of caching. Is caching realistically possible on dynamic sites? I need to explain to the class at runtime when and how to execute caching but my mind isn't quite figuring out the best way how. It may be available on google ( i've searched ) so if it's something common or if someone knows of a good article just give me a link or a google search term and I'll do my own searching. Many thanks.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Template Caching

Post by alex.barylski »

Charles256 wrote:So I am writing my own template class. I've gotten to the point of adding in external css, inline css, external and inline javascript, title, doctype, body, a set footer, all the good basics essentially. The next issue I come up to is the issue of caching. Is caching realistically possible on dynamic sites? I need to explain to the class at runtime when and how to execute caching but my mind isn't quite figuring out the best way how. It may be available on google ( i've searched ) so if it's something common or if someone knows of a good article just give me a link or a google search term and I'll do my own searching. Many thanks.
Absolutely! Is it difficult? Absolutely.

Effective caching usually requires a solid understanding of the system you are trying to speed up. Are your pages dynamic only in generation/compilation? Are they dynamically interactive, in the sense that you will allow people to post blog comments or add classified listings?

I need more details before I can suggest a effective caching technique. :)
Post Reply