CGI::Buffer is a Perl module to optimize the output of a CGI program.
SYNOPSIS
CGI::Buffer speeds the output of CGI programs by compressing output and by nearly seemlessley making use of client and server caches.
To make use of client caches, that is to say to reduce needless calls to your server asking for the same data, all you need to do is to include the package, and it does the rest.
use CGI::Buffer;
...
To also make use of server caches, that is to say to save regenerating output when different clients ask you for the same data, you will need to create a cache. But that's simple:
use CGI::Buffer;
use CHI;
# Put this at the top before you output anything
CGI::Buffer::set_options(
cache => CHI->new(driver => 'File')
);
if(CGI::Buffer::is_cached()) {
exit;
}
...
Product's homepage
Requirements:
· Perl