in reply to Re: Repetitive File I/O vs. Memory Caching
in thread Repetitive File I/O vs. Memory Caching
It's the mod_perl that is threaded, not my perl script. Under a single-process/multi-threaded Apache, any variables declared such as what I did will share that variable across each mod_perl thread... it works for me anyhow :) If you don't believe me, pop this script under a mod_perl environment. Indeed, if I were using a multi-process Apache (forked rather than threaded), a separate count would be kept for each Apache process:
#!c:/perl/bin/perl -w $|++; use strict; use CGI::Simple; use vars qw($count); # could also use our() my $CGI = CGI::Simple->new(); print $CGI->header(), ++$count;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re^2: Repetitive File I/O vs. Memory Caching
by perrin (Chancellor) on Mar 28, 2004 at 17:25 UTC |