Jump to content

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;
OR
(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.
RT
Link to comment
https://forums.phpfreaks.com/topic/9383-cache-in-question/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.