The Artima Developer Community
Sponsored Link

PHP Buzz Forum
HTTP_Cache released

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Stephan Schmidt

Posts: 238
Nickname: schst
Registered: Sep, 2004

Stephan Schmidt is a founding member of PHP Application Tools and a PEAR developer.
HTTP_Cache released Posted: Jun 5, 2005 8:24 AM
Reply to this message Reply

This post originated from an RSS feed registered with PHP Buzz by Stephan Schmidt.
Original Post: HTTP_Cache released
Feed Title: a programmer's best friend
Feed URL: http://blog.php-tools.net/rss.php?version=1.0
Feed Description: The blog of PHP Application Tools
Latest PHP Buzz Posts
Latest PHP Buzz Posts by Stephan Schmidt
Latest Posts From a programmer's best friend

Advertisement
I just released HTTP_Cache 0.1.0 through our own PEAR-Channel at pear.php-tools.net. I proposed this package via PEPr some time ago, but because some of the functionality already is available in the packages HTTP_Header and HTTP_Download I never initiated the call for votes. But still I think this small package is quite useful when you need HTTP-Caching using ETag. As it supplies a handler for PHP's output buffering all you need to add to your scripts are two lines of code:
require_once 'HTTP/Cache.php';
$cache = &new HTTP_Cache(array('auto' => true));

echo "You now may send any data to the browser";

If a user now requests this page twice, it will be only sent to the browser once, unless the output has changed in the meantime.

If you are using PEAR 1.4 installing the package is nearly as easy as installing a package from PEAR:
$ pear channel-discover pear.php-tools.net
$ pear install pat/HTTP_Cache

The package will be get installed in the PEAR directory of you server and you can instantly start to use it.

Read: HTTP_Cache released

Topic: WordPress Plugin: Automatic Machine Translation for Your Blog in Eight Languages - Spanish,... Previous Topic   Next Topic Topic: Understanding $_SERVER[’PHP_SELF’], $PHP_SELF, $_SERVER[’REQUEST_URI’]...

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use