【问题标题】:how to exclude .php file from APC cache?如何从 APC 缓存中排除 .php 文件?
【发布时间】:2012-11-19 15:06:14
【问题描述】:

我将顶级用户数据缓存在一个名为 top_users.php 的文件中,我们称之为文件缓存。

但是APC会缓存所有的.php文件,如何从APC中排除一些特殊的.php文件

缓存?

【问题讨论】:

    标签: php caching apc


    【解决方案1】:

    您可以在 apc 配置文件中使用过滤器:

    apc.filters = "-/usr/share/files/.*"
    

    这不会缓存该模式下的文件,基本上该路径下的任何文件 /usr/share/files/

    对你来说,你可以使用:

    apc.filters = "-/my/share/top_users\.php"
    

    看看http://www.php.net/manual/en/apc.configuration.php#ini.apc.filters

    这假设文件被绝对路径所需要或包含。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-04-15
      • 1970-01-01
      • 2010-12-02
      • 2010-10-29
      • 1970-01-01
      • 2016-05-26
      • 2010-12-16
      • 1970-01-01
      相关资源
      最近更新 更多