guice has asked for the wisdom of the Perl Monks concerning the following question:
What are some techniques for caching a hash? I have a rather large Perl script that tends to get a bit heavy in CPU and memory. To assist in alleviating that, I want to start caching some larger hashes (so they don't remain in memory when not needed).
In PHP, I can just serialize an array and write it to a file in /tmp for a "quick cache" and then load it up later on in the script for the specific functions/methods I need it in. But I can't think of any method in Perl that would resemble that. I'm looking for methods using more of the built in Perl methods and/or default Perl modules.
Do you all do hash caching and if so how do you do it?
Before somebody suggests a third party module: it's important to note I have limited access to Perl modules. Code is on an internal system with no Internet access and the requirements to get *anything* added to even just Perl modules is insane. Not to mention we have no local environment to compile code.
Thanks much!
-- philip
We put the 'K' in kwality!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Caching a hash?
by duff (Parson) on Mar 09, 2006 at 18:23 UTC | |
Re: Caching a hash?
by moot (Chaplain) on Mar 09, 2006 at 18:24 UTC | |
by friedo (Prior) on Mar 09, 2006 at 18:29 UTC | |
by perrin (Chancellor) on Mar 09, 2006 at 18:30 UTC | |
by guice (Scribe) on Mar 10, 2006 at 21:45 UTC | |
Re: Caching a hash?
by pboin (Deacon) on Mar 09, 2006 at 19:36 UTC | |
by guice (Scribe) on Mar 10, 2006 at 21:42 UTC | |
Re: Caching a hash?
by davidrw (Prior) on Mar 09, 2006 at 19:54 UTC |