How does caching work?
| From: | Paul M Foster | Date: | Tue, 09 Jun 2009 20:35:12 +0000 |
| Subject: | How does caching work? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-293818@lists.php.net to get a copy of this message | ||
This question may be too complex for a reasonable answer on this list,
but I'll ask anyway.
If a page has static content (no PHP variables, etc.), I can
understand how caching works. The engine just checks to see if it's got
a copy of the requested page in the cache, and displays it if so, or
fetches it if not.
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?
Paul
--
Paul M. Foster