Jump to content


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


Cache in Question

Recommended Posts

Hi all

I'm currently designing a PHP app that should be subject to intense peaks of connections once it is in place. I'm therefore pondering whether to implement some kind of caching system. Full HTML output caching is out of question, as the app is divided into different parts that can evolve at different paces depending on the kind of activity they receive. The main constraint is that data from the different parts can be needed in to display other parts, or to display some user-defined page.

So my choice is the following:
(a) just don't cache, hope the servers will hold, and grab the data from the database when needed and compute the HTML output every time;
(b) set up an intermediary data storage in XML for each module, and when loading a module inside a page, just check the data has not been modified (through a track number in the database) and insert it into a main XML document representing the page, to be transformed into HTML.
The idea of using XML also seems interesting as it allows reusing cached data anywhere in the app.

So the big deal is whether (b) is really better than (a) in terms of performance, knowing that the database queries we are talking about can be very different across modules - loops through forum posts or just grabbing one record from a table.
There's a also subsidiary question to choice (b) : should the XML file we get in the end representing the page be transformed with XSLT server-side or client-side ? I mean, does anyone know whether many users could end up not seeing the page as they should because their browser doesn't know about transforming XML ?

Thanks for any comments.

Share this post

Link to post
Share on other sites
I find your post very interesting, but I don't think I fully understand. How does writing/reading data to/from XML reduce server load or increase stability?

The way I see it, the opposite is true. But then again, I might just not understand.

Share this post

Link to post
Share on other sites


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.