Jump to content


Cache in Question

  • Please log in to reply
2 replies to this topic

#1 rt-box

  • Members
  • Pip
  • Newbie
  • 6 posts
  • LocationParis, France

Posted 09 May 2006 - 12:45 PM

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.

#2 rt-box

  • Members
  • Pip
  • Newbie
  • 6 posts
  • LocationParis, France

Posted 09 May 2006 - 04:49 PM

please help

#3 448191

  • Staff Alumni
  • Advanced Member
  • 3,545 posts
  • LocationNetherlands

Posted 10 May 2006 - 11:58 AM

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.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users