Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: [mod_perl] when does it keep data in memory?

by matija (Priest)
on Nov 27, 2004 at 11:53 UTC ( #410701=note: print w/ replies, xml ) Need Help??


in reply to [mod_perl] when does it keep data in memory?

When variables are declared with my (under strict), they are 'reset' every time my mod_perl registry script is run. How then do i save my datastructure that took 10 seconds to build so that on the next run it doesn't have to rebuild it?

That's not your only problem. Even if you manage to keep the data in memory, you can't gurantee (in fact, on a busy server the chances are pretty slim) that the next request will hit the same server. So you'll have the data in memory, but in another process, as out of reach as if you had it on the other side of the moon.

Perhaps you'd be better of saving it in a database, a DB_File, or even a text file...


Comment on Re: [mod_perl] when does it keep data in memory?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://410701]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2014-09-16 03:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (155 votes), past polls