Cache::Memcached::Fast::CGI - Capture the STDOUT for Memcached in a pure cgi program!
Version 0.06
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;
# Add the key and valuse into memcahced $cmfc->add($key,$value,$time);
## End capture my $captured = $cmfc->end();
## Automatic end of the capture $cmfc->auto_end($key,$time);
=HITSU, <hitsubunnu at gmail.com>
<hitsubunnu at gmail.com>
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.
bug-cache-memcached-fast-cgi at rt.cpan.org
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
http://annocpan.org/dist/Cache-Memcached-Fast-CGI
CPAN Ratings
http://cpanratings.perl.org/d/Cache-Memcached-Fast-CGI
Search CPAN
http://search.cpan.org/dist/Cache-Memcached-Fast-CGI/
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.
To install Cache::Memcached::Fast::CGI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Cache::Memcached::Fast::CGI
CPAN shell
perl -MCPAN -e shell install Cache::Memcached::Fast::CGI
For more information on module installation, please visit the detailed CPAN module installation guide.