Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: using (lookup) hashes to store/cache database data

by gav^ (Curate)
on Apr 17, 2002 at 05:55 UTC ( [id://159720]=note: print w/replies, xml ) Need Help??


in reply to using (lookup) hashes to store/cache database data

I've found that if I'm going to do a lot of data accesses and the data is pretty static then loading it all into a hash and saving it with Storable to disk can be a real time saver. This works really well if you are tweaking the output, for example I was creating HTML pages from MySQL and it took quite a few queries per page. I first started just dumping the data structure with Data::Dump on each page and then refining the output until I was happy. If I had to reload the data from the DB each time this could have been quite painful.

gav^

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-03-29 13:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found