in reply to thread-safe mmap module ?
Never used them myself, but a CPAN search for shared cache brings up a number of promising looking modules, including IPC::SharedCache and Cache::FastMmap. The documentation from Cache::FastMmap says:
It uses fcntl locking to ensure multiple processes can safely access the cache at the same time.so it should certainly be thread-safe.
In Section
Seekers of Perl Wisdom