Re: How does caching work?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 9, 2009 at 16:35, Paul M Foster<paulf@xxxxxxxxxxxxxxxxx> wrote:
>
> But if a page is populated with variables from a database (for example)
> which could change from time to time, how could a caching engine
> possibly cache it? How would it determine whether to re-fetch the page
> or use the cached version?

    This is more a matter of the HTTP protocol and HTML standards.
Check into meta (pragma) 'no-cache' tags and Google "cache control"
for the basics on this.

    Thankfully, (at least most) clients do not check the full page to
see if there's an updated version --- because if they did, they may as
well display it, as they'd use up the network, server, and a portion
of the client resources in doing so.  Instead, they check the cache
expire time and/or compare the local (cached) copy against the
timestamp of what the server says for the file's "last-modified" stamp
- known as a file's 'mtime' data.

    If I've somehow circumlocuted your question, ignore me and pretend
I was never here.  ;-P

-- 
</Daniel P. Brown>
daniel.brown@xxxxxxxxxxxx || danbrown@xxxxxxx
http://www.parasane.net/ || http://www.pilotpig.net/
50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW10000

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux