Linux SoftwareProgrammingLibrariesCGI::Cache 1.4200

CGI::Cache 1.4200


CGI::Cache is a Perl extension to help cache output of time-intensive CGI scripts. WARNING The interface as of version 1.01 has
Developer:   Broc Seib
      more software by author →
Price:  0.00
License:   Perl Artistic License
File size:   43K
Language:   
OS:   
Rating:   0 /5 (0 votes)
Your vote:  
enlarge screenshot


CGI::Cache is a Perl extension to help cache output of time-intensive CGI scripts.

WARNING

The interface as of version 1.01 has changed considerably and is NOT compatible with earlier versions. A smaller interface change also occurred in version 1.20.

SYNOPSIS

Here's a simple example:

#!/usr/bin/perl

use CGI;
use CGI::Cache;

# Set up cache
CGI::Cache::setup();

my $cgi = new CGI;

# CGI::Vars requires CGI version 2.50 or better
CGI::Cache::set_key($cgi->Vars);

# This should short-circuit the rest of the loop if a cache value is
# already there
CGI::Cache::start() or exit;

print $cgi->header, "n";

print < body >
< p >

This prints to STDOUT, which will be cached.
If the next visit is within 24 hours, the cached STDOUT
will be served instead of executing this 'print'.

< /body >< /html >

EOF

Here's a more complex example:

use CGI;
use CGI::Cache;

my $query = new CGI;

# Set up a cache in /tmp/CGI_Cache/demo_cgi, with publicly
# unreadable cache entries, a maximum size of 20 megabytes,
# and a time-to-live of 6 hours.
CGI::Cache::setup( { cache_options =>
{ cache_root => '/tmp/CGI_Cache',
namespace => 'demo_cgi',
directory_umask => 077,
max_size => 20 * 1024 * 1024,
default_expires_in => '6 hours',
}
} );

# CGI::Vars requires CGI version 2.50 or better
CGI::Cache::set_key( $query->Vars );
CGI::Cache::invalidate_cache_entry()
if $query->param( 'force_regenerate' ) eq 'true';
CGI::Cache::start() or exit;

print "Content-type: text/htmlnn";

print < body >
< p >

This prints to STDOUT, which will be cached.
If the next visit is within 6 hours, the cached STDOUT
will be served instead of executing these 'prints'.
< /p >
EOF

CGI::Cache::pause();

print
tags cgi cache  use cgi  cgi vars  print body  cache set  next visit  the next  which will  hours the  stdout will  tmp cgi  demo cgi  served instead  

Download CGI::Cache 1.4200


 http://ftp.casaafacerilor.ro/mirrors/CPAN/authors/id/D/DC/DCOPPIT/CGI-Cache-1.4200.tar.gz


Authors software

CGI::Cache 1.4200 (by Broc Seib)
CGI::Cache is a Perl extension to help cache output of time-intensive CGI scripts.

WARNING

The interface as of version 1.01 has


Similar software

CGI::Cache 1.4200 (by Broc Seib)
CGI::Cache is a Perl extension to help cache output of time-intensive CGI scripts.

WARNING

The interface as of version 1.01 has

Skycache 2.2 (by Skycache Team)
Skycache is a lightweight, free and fast page cache for PHP 4 and PHP 5.

Once a dynamic page has been computed, it is stored in a

Mod-Cache 1.2 (by QUE Hongyu)
Mod-Cache is a cache(reverse-proxy) accelerator plugin for lighttpd, which works like Squid with similar configuration

CPAN::Cache 0.02 (by Adam Kennedy)

IPC::SharedCache 1.3 (by Sam Tregar)
IPC::SharedCache is a Perl module to manage a cache in SysV IPC shared memory.

SYNOPSIS

use IPC::SharedCache;

# the cach

Rails Page Cache Test Plugin 0.2 (by canatella)
Rails Page Cache Test Plugin adds two assertions to the Test::Units::TestCase class of Ruby on Rails to check the caching and expirin

jnget 0.2.1 (by Santa)
jnget is a command-line tool for retrieving binaries from Usenet.

jnget project allows multi-thread downloading and partial or ful

Squid 1.2 (by Squid Hackers)

sdcv 0.4.2 (by Evgeniy A. Dushistov)

flc 1.4.2 (by NoisyB)
flc creates BBS-style file lists with FILE_ID.DIZ found in archives and files.

Usage: flc [OPTION]..


Other software in this category

zlib 1.2.3 (by Jean-loup Gailly)
zlib is designed to be a free, general-purpose, legally unencumbered, lossless data-compression library for use on virtually any comp

libjpeg v6b (by Independent JPEG Group)
libjpeg is a library for handling the JPEG (JFIF) image format

OpenSSL 0.9.7c (by The OpenSSL Project Team)
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implement

libxml2 2.6.27 (by DV)
Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform), libxml2 library i

GNU C library 2.4 (by Andreas Jaeger)
GNU C library (glibc) is one of the most important components of GNU Hurd and most modern Linux distributions.

GNU C library is us

    search


Featured Software

jEdit 4.3 pre8
jEdit is an Open Source text editor written in Java

Opera 9.02
Surf the Internet in a safer, faster, and easier way with Opera browser

GNU Aspell 0.60.4
GNU Aspell is a Free and Open Source spell checker designed to eventually replace Ispell


Subscribe in Rojo
Google Reader
Add to My Yahoo!

Add to My AOL
Subscribe with Bloglines
Subscribe in NewsGator Online
Add 'nixbit linux software' to Newsburst from CNET News.com
del.icio.us nixbit linux software


Top tags