Path: usenet.cise.ufl.edu!huron.eel.ufl.edu!usenet.eel.ufl.edu!news.ultranet.com!newspump.monmouth.com!newspeer.monmouth.com!cpk-news-hub1.bbnplanet.com!cam-news-hub1.bbnplanet.com!news.bbnplanet.com!news.mathworks.com!uunet!in2.uu.net!news.neta.com!not-for-mail
From:
[email protected] (Broc Seib)
Newsgroups: comp.lang.perl.announce,comp.lang.perl.modules
Subject: ANNOUNCE: CGI::Cache
Followup-To: comp.lang.perl.modules
Date: 9 Jul 1998 13:58:37 GMT
Organization: Purdue University Computing Center
Lines: 95
Approved:
[email protected] (comp.lang.perl.announce)
Message-ID: <
[email protected]>
NNTP-Posting-Host: gadget.cscaper.com
X-Disclaimer: The "Approved" header verifies header information for article transmission and does not imply approval of content.
Xref: usenet.cise.ufl.edu comp.lang.perl.announce:88 comp.lang.perl.modules:2676
The module CGI::Cache should now be available on a CPAN
server near you. See
http://www.perl.com/CPAN/CPAN.html for
info about the Comprehensive Perl Archive Network if you are new
to this.
Full documentation is available as embedded pod in the module,
using perldoc. You may also see the same docs online:
http://icd.cc.purdue.edu/~bseib/pub/CGI-Cache.html
-b
CGI::Cache
==========
Copyright (c) 1998 Broc Seib. All rights reserved. This program
is free software; you can redistribute it and/or modify it under
the same terms as Perl itself.
Broc Seib,
[email protected]
SYNOPSIS
========
use CGI::Cache;
$TTL = 6*60*60; # time to live for cache file is 6 hours
CGI::Cache::Start('/tmp/cgi_cache/sample_cachefile.html',$TTL);
print "Content-type text/html\n\n";
print "This prints to STDOUT, which will be cached.";
print "If the next visit is within 6 hours, the cached STDOUT";
print "will be served instead of executing these 'prints'.";
DESCRIPTION
===========
This module is intended to be used in a CGI script that may
benefit from caching its output. Some CGI scripts may take
longer to execute because the data needed in order to construct
the page may not be readily available. Such a script may need to
query a remote database, or may rely on data that doesn't arrive
in a timely fashion, or it may just be computationally intensive.
Nonetheless, if you can afford the tradeoff of showing older,
cached data vs. CGI execution time, then this module will perform
that function.
INSTALLATION
============
To install this package, change to the directory where you
unarchived this distribution and type the following:
perl Makefile.PL
make
make test
make install
During the 'make test', there are some tests that take a while
longer to run. While testing that caching is working, CPU times
are being recorded on some badly written code to see that
performance will actually be increased on subsequent visits.
Don't panic. It may take a couple of minutes to run, depending
on your system.
If you do not have root access on your machine, then you may
not have the ability to install this module in the standard
perl library path. You may direct the installation into your
own space, e.g.,
perl Makefile.PL LIB='/home/bseib/lib'
or perhaps the entire installation, e.g.,
perl Makefile.PL PREFIX='/home/bseib'
If you make the installation into your own directory, then
remember that you must tell perl where to search for modules
before trying to 'use' them. For example:
use lib '/home/bseib/lib';
use CGI::Cache;
The most current version of this module should be available
at your favorite CPAN site, or may be retrieved from
http://icd.cc.purdue.edu/~bseib/pub/CGI-Cache-X.XX.tar.gz
Please let me know if you are using this module. Tell me what
bugs you find or what can be done to improve it.