APC在哪里存储数据? [英] Where does APC store the data?

查看:102
本文介绍了APC在哪里存储数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用apc_store()缓存一些结果.

但是我需要知道数据将存储在哪里以及有什么限制.

But I need to know where the data will be stored, and what's the limit.

它始终存储在内存中吗?还是也写到磁盘上?我希望将不经常访问的数据存储在磁盘上.我是否应该为此使用其他缓存系统?

Does it always store on memory? Or also writes to disk? I would prefer that the data that is not accessed very frequently is stored on disk. Should I use a different caching system for that?

这是极限吗? apc.shm_size = 32MB.如果是这样,当我超过时会发生什么?

Is this the limit? apc.shm_size = 32MB. If so, what happens when I exceed it?

推荐答案

通过apc_store()存储在APC变量高速缓存中的数据始终存储在内存中.如果您需要存储的数据超出了实际需要,那么您需要自己提出其他一些缓存解决方案.

Data stored in the APC variable cache via apc_store() is always stored in memory. If you need to store more data than this makes sense for, you'll need to come up with some other caching solution yourself.

apc.shm_size配置指令设置整个 APC共享内存缓存的大小,该缓存用于操作码和用户变量.如果您向缓存中写入的数据多于此处指定的数量,则将从最近使用最少的元素开始,将元素从缓存中删除.您的代码需要能够处理这个问题-毕竟是缓存,而不是数据库.

The apc.shm_size configuration directive sets the size of the whole APC shared memory cache, which is used for both opcodes and user variables. If you write more data to the cache than specified here, elements will be dropped from the cache, starting with the least recently used. Your code needs to be able to deal with this -- it's a cache, after all, not a database.

这篇关于APC在哪里存储数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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