Re: Conditional Requests (CACHING)
| From: | (Richard Lynch) | Date: | Fri, 16 Jun 2000 00:10:15 +0000 |
| Subject: | Re: Conditional Requests (CACHING) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-2013@lists.php.net to get a copy of this message | ||
In article <20000613210650.A29462@gerf.org>, docwhat@gerf.org (The Doctor
What) wrote:
> Is it possible to have apache and PHP play nice together with
> respect to conditional requests?
>
> Example:
>
> A PHP page sending a Last-Modified header and sets Cache-Control as
> Must-Validate.
>
> So a Cache collects this page.
>
> Then someone else requests this page.
>
> The cache sends a "Conditional request", asking to have a page sent
> only if it's newer.
>
> PHP/Apache will just send the whole thing again.
>
> I would prefer if it didn't. This kind of makes the Last-Modified
> header useless. Very useless with 'must-validate' set.
>
> Oy.
>
> Is there a way around this?
The meaning of all these caching headers and who does what when has never
been well-designed (or it it was designed, not enough implementers paid
attention)...
And then some people decided to just ignore them, or to make up new ones
for themselves since they were oh so special (AOL).
Come to think of it though, since PHP is generating the page on the fly,
then, by definition, it's newer than the other one you got... Just how do
you want Apache and PHP to know that the page PHP would generate, if you
wanted it, is the same as the one it generated before?...
If you're really hot on page-caching, you may have to write a PHP program
that creates static pages, which are then served up, and some other
trigger to decide when to re-create the static pages...
--
Richard Lynch | If this was worth $$$ to you, buy a CD
US Customer Support Director | from one of the artists listed here:
Zend Technologies USA | http://www.L-I-E.com/artists.htm
http://www.zend.com | (this has nothing to do with Zend,
duh!)