Starting to fix handling of the HTTP validator headers, Last-Modified,
and ETag.
Last-Modified was being set incorrectly (but only when DEBUG was not
defined!) Setting a Last-Modified without setting an appropriate
Expires: and/or Cache-Control: header results in browsers caching
the page unconditionally (for a certain period of time).
This is generally bad, since it means people don't see updated
page contents right away --- this is particularly confusing to
the people who are editing pages since their edits don't show up
next time they browse the page.
Now, we don't allow caching of pages without revalidation
(via the If-Modified-Since and/or If-None-Match request headers.)
(You can allow caching by defining CACHE_CONTROL_MAX_AGE to an
appropriate value in index.php, but I advise against it.)
Problems:
o Even when request is aborted due to the content not being
modified, we currently still do almost all the work involved
in producing the page. So the only real savings from all
this logic is in network bandwidth.
o Plugins which produce "dynamic" output need to be inspected
and made to call $request->addToETag() and
$request->setModificationTime() appropriately, otherwise the
page can change without the change being detected.
This leads to stale pages in cache again...
git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@2566
96ab9672-09ca-45d6-a79d-
3d69d39ca109