in reply to mod_perl memory question

Both MySQL and SDBM_File should work fine for this. MySQL is very fast at this kind of simple data access. If you'd rather use a dbm file, try using SDBM_File through the MLDBM::Sync module, which handles the locking.

If this is really a cache, not a database, and you don't care if you might lose the data, then memcached is ok too, but if you only have one machine (not a cluster) and don't mind the possibility of data loss, Cache::FastMmap is the fastest thing around.

You might also look at CHI for a high-level interface that lets you try various caching modules.