Re: Packages'name and extensions of PEAR
| From: | Michael Wallner | Date: | Thu, 09 Dec 2004 16:17:35 +0000 |
| Subject: | Re: Packages'name and extensions of PEAR | ||
| References: | 1 2 | Groups: | php.pear.qa |
| Request: | Send a blank email to pear-qa+get-2157@lists.php.net to get a copy of this message | ||
Hi Stephan Schmidt, you wrote:
> But that's not what I'd like to do. I'd either let the maintainer of
> HTTP_Header integrate this into the package or work on a new package
> that is able to do Etag and Last-Modified caching.
>
> But this is something Mike and I will have to solve.
Slowly I wonder what's wrong with HTTP_Download? :)
If caching by ETag does not work with HTTP_Download
for you, I'd really appreciate a bug report...
Please forget the name and just look at what it can do...
Even (sort of) an auto-caching feature is quite easily
implementable (not proven to work):
---cut---
require_once 'HTTP/Download.php';
class CachedPage
{
var $data;
function CachedPage
{
ob_start(array(&$this, 'obCapture'));
}
function obCapture($data)
{
$this->data .= $data;
}
function display()
{
$dl = &new HTTP_Download(
array(
'data' => $this->data,
'contenttype' = 'text/html'
)
);
return $dl->send(false);
}
}
---cut---
No intention to isult here, so there are other ways I could think of:
Obviously some don't like to have another HTTP_Cache package in PAER,
so I could make you a lead of HTTP_Header and you put your ETag caching
class into this package and can release HTTP_Header yourself...
Hm... :)
Regards,
--
Michael - < mike(@)php.net >
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc