Re: How to test response cache is working or not?

From: Paul Barfoot (Paul_at_theglobalfamily.fsworld.co.uk)
Date: 10/28/04

  • Next message: Alex: "PHP help evaluating an arithmetic equation"
    Date: Thu, 28 Oct 2004 16:28:37 +0100
    
    

    Hi Bhavin

    Try this, it worked for me.

    Put the following line in your html script so that it is placed in the
    <head> section of the html after <title>:

       <meta name="Date" content ="<?print date('d/m/y H:i:s') ?>" />

    (1) Load the page and view the source html of the page - <meta name="Date"
    content = ??? should show the time/date of when the page was created.
    (2) Now re-load the page (don't use Refresh as this will override the
    cache!) and view the source html again.
      - If you were within the 60s then the time/date should be the same as in
    (1)
      - If you were outside the 60s then you should have a new time/date.

    You might want to increase the time to 120s during testing to give yourself
    more time.

    -- 
    Paul Barfoot
    The Global Family Website is at: http://tgf.athnic.com
    "Bhavin Patel" <bhawin13@indiatimes.com> wrote in message 
    news:eef24e5f.0410280401.42b6e902@posting.google.com...
    > Hello,
    >
    > I have written this code in php file. to set cache for 60 second.
    >
    > ==============================================================
    >
    > Header("Cache-Control: must-revalidate");
    > $offset = 60;
    > $ExpStr = "Expires: " . gmdate("D, d M Y H:i:s", time() + $offset) . "
    > GMT";
    > Header($ExpStr);
    >
    > ==============================================================
    > How to test response cache is working or not? Please help me to find
    > out correct way towards solution. I want to cache page for 60 second.
    >
    > Thanks for valuable time.
    > bhawin13 
    

  • Next message: Alex: "PHP help evaluating an arithmetic equation"

    Relevant Pages

    • Re: Simple caching system question
      ... building cached files for the admin itself, merely pointing out that, ... Now suppose that the "article" you talk of appears on an HTML page, ... Now if the data for any one of the modules is changed, or the picture ... modules that could affect same cache because from their point of view, ...
      (comp.lang.php)
    • Re: [PHP] PHP+MySQL website cache ? Yes/No
      ... Put your shopping chart items, rendered html items in memcached. ... I was going to make this file cache system, but I relies that for each ...
      (php.general)
    • What kind of tcl tools would help me parse and use html info?
      ... fetch an html http URL ... Look through the A tags for some specific phrases ... For each one found, check a file cache. ... as the next html to parse and search. ...
      (comp.lang.tcl)
    • Re: What kind of tcl tools would help me parse and use html info?
      ... fetch an html http URL ... Look through the A tags for some specific phrases ... For each one found, check a file cache. ... For one of the specific phrases, instead of caching the file, treat it ...
      (comp.lang.tcl)
    • Re: Please advise about caching
      ... OutputCache caches the entire rendered HTML, ... the closer to the final product you can cache ... > version is that product pages are generated dynamically from a database. ...
      (microsoft.public.dotnet.framework.aspnet)