Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: mod_perl memory question

by Rhandom (Curate)
on Mar 05, 2008 at 15:46 UTC ( #672199=note: print w/replies, xml ) Need Help??


in reply to mod_perl memory question

If the cache needs to be shared among children - I second the vote for memcache.

If each child needs its own, I'd do something like the following using the End module:

# add clear_cache method to your sharedcache package sharedcache; sub clear_cache { $cache = undef } # inside your apache handler use the following: use End; sub handler { my $clear_cache = end { sharedcache::clear_cache() }; # normal handler operations go here }


When your handler goes out of scope - the object stored in $clear_cache will go out of scope and the stored coderef will fire - clearing your cache.

my @a=qw(random brilliant braindead); print $a[rand(@a)];

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://672199]
help
Chatterbox?
[shmem]: stevieb: in my case, it's just light controlling via some chip from the arduino family, and a couple of MPR121 sensor chips
[shmem]: well finally.
[stevieb]: nice! I just finished a GPS "take me home" device last week, and did a bunch of software updates to it yesterday. I also created a pseudo chip with an Arduino to simulate an IC, where it responds to register read/writes over the I2C bus...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2017-06-25 22:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (572 votes). Check out past polls.