NAME
Cache::Memcached::Fast::CGI - Capture the STDOUT for Memcached in a pure cgi program!
VERSION
Version 0.06
SYNOPSIS
use Cache::Memcached::Fast::CGI;
my $cmfc = Cache::Memcached::Fast::CGI->new({
servers => ['localhost:11211'],
connect_timeout => 0.3
## ...
});
my $key = $ENV{'SCRIPT_FILENAME'}.'?'.$ENV{'QUERY_STRING'};
## Retrieve values
my $value = $cmfc->get($key);
print $value and exit if $value;
## Start capture
$cmfc->start();
print "Content-type: text/html;charset=utf-8\n\n";
print "<html><body>";
print "hello world -- 1<br>";
## ...
print "hello world -- 2<br>";
print "</body></html>";
## Automatic end of the capture
$cmfc->auto_end($key);
exit;
SUBROUTINES/METHODS
add
# Add the key and valuse into memcahced
$cmfc->add($key,$value,$time);
end
## End capture
my $captured = $cmfc->end();
auto_end
## Automatic end of the capture
$cmfc->auto_end($key,$time);
AUTHOR
=HITSU, <hitsubunnu at gmail.com>
BUGS
Please report any bugs or feature requests to bug-cache-memcached-fast-cgi at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Cache-Memcached-Fast-CGI. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Cache::Memcached::Fast::CGI
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Cache-Memcached-Fast-CGI
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
LICENSE AND COPYRIGHT
Copyright 2010 =Hitsu Bunnu.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.