Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Looking for a Perl module to store a Hash structure in shared RAM

I'd like to store a data structure persistently in RAM and have it accessible from pre-forked web server processes in Perl.

Ideally I would like it to behave like memcached but without the need for a separate daemon. Any ideas?

like image 221
noobi-1 Avatar asked Jun 19 '10 08:06

noobi-1


2 Answers

Use Cache::FastMmap and all you need is a file. It uses mmap to provide a shared in-memory cache for IPC, which means it is quite fast. See the documentation for possible issues and caveats.

like image 194
kixx Avatar answered Nov 16 '22 16:11

kixx


IPC::SharedMem might fit the bill.

like image 31
Sinan Ünür Avatar answered Nov 16 '22 15:11

Sinan Ünür