Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

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
Domain Nodelet?
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 romping around the Monastery: (9)
As of 2022-01-27 21:24 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (71 votes). Check out past polls.