Don't ask to ask, just ask | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
If you are using mod_perl or FastCGI you can store the data in memory, using a persistent variable (such as a package global). That is very easy to do, but does not work with vanilla CGI. If the data needs to be periodically refreshed, it cannot be shared among the mod_perl processes, but if that data is small, at least the memory penalty of having to store many copies (one in each process) is not an issue.
You can store (almost) any kind of Perl data to disk (or shared memory) with the core module Storable. If you do not want to roll the code yourself, check the various Cache modules on CPAN. As for the timestamp, I would include that in the cached data. You can then compare it after retrieving from the cache. In reply to Re: DBI : local persistent storage
by Thilosophy
|
|