donpb2823 2011-05-08 10:41
浏览 5
已采纳

我安装了APC,现在?

I'm running a Zend Framework powered website, it works great, etc.

I've the following option apc.cache-by-default sets to on when I check apc.php I can see a lost of file, I'm new to APC, and I'm wondering what kind of surprise could I have with this option.

I assume it is only an opcode cache of the files, then no data is cached and I won't see any difference within my website (which needs some realtime data).

Am I right?

The next step for me is to use APC to cache some db result, but first I'd like to be sure of what a default APC configuration already does for me.

Thank you

  • 写回答

1条回答 默认 最新

  • dongxi3911 2011-05-08 14:05
    关注

    APC's primary, out the box use is to store the code cache. It can also store data, and indeed, it's quite likely the fastest such cache as it is so closely held (in memory, and the code) to the PHP interpreter.

    http://uk.php.net/manual/en/function.apc-store.php andthe matching apc_fetch have details of how to use the user/data-caching side of APC.

    The only downsides are that it has limited space - no more than 32-64MB space allocations for APC's use are normal, and often as much as you would need. For large items, or more than a couple of hundred smaller variables to cache, then something like Memcached, or caching to disk, would be more useful.

    The other downside is that since the cache is in memory, any variables being cached are onto a specific machine - again, something that Memcached can avoid, but at a cost of time (usually time taken over the local network).

    In summary, APC is very highly recommended for the code caching (and it has save me literally billions of PHP compilation steps per week), and as a limited, but highly performant 1st-level cache of limited data cache.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 关于大棚监测的pcb板设计
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题