寻找 Perl 模块以在共享 RAM 中存储哈希结构 [英] Looking for a Perl module to store a Hash structure in shared RAM

查看:41
本文介绍了寻找 Perl 模块以在共享 RAM 中存储哈希结构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将数据结构持久存储在 RAM 中,并可以从预分叉中访问它Perl 中的 Web 服务器进程.

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

理想情况下,我希望它的行为类似于 memcached,但不需要单独的守护程序.有什么想法吗?

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

推荐答案

使用 Cache::FastMmap 而你所需要的只是一个文件.它使用 mmap 为 IPC 提供共享内存缓存,这意味着它非常快.请参阅文档以了解可能的问题和注意事项.

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.

这篇关于寻找 Perl 模块以在共享 RAM 中存储哈希结构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆