ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-mod_perl
perl-mod_perl
Re: Storing config values in-memory between sessions
by Perrin Harkins other posts by this author
Oct 29 2009 8:30AM messages near this date
Storing config values in-memory between sessions | Re: Storing config values in-memory between sessions
On Thu, Oct 29, 2009 at 12:13 AM, Mahesh Khambadkone
<mahesh@[...].com>  wrote:
>  Confused slightly by the Apache phases and how it plays with older CGI
>  scripts, what would be the best way to implement this in-memory cache
>  that can be dirtied from time to time?

You can't keep things in memory with CGI scripts because they are
spawned and exit on each request.  You'll need to cache things in a
database or file.  The dirt-simple solution is a file that you write
periodically from a cron job, and read from your CGI scripts.  If you
read it frequently, it will be kept in the filesystem cache so the
read will be extremely fast.

- Perrin
Thread:
Mahesh Khambadkone
Perrin Harkins
Torsten Foertsch
Alan Young

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved