Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

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?

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (9)
As of 2015-07-06 11:53 GMT
Find Nodes?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...

    Results (73 votes), past polls