如何";事实上";配置PHP APC?
在有人投票否决这一点并将这一问题深入讨论之前,请投票否决者友好地指出一些更好的资源。谢谢 我有副总裁,它运行一个可湿性粉剂博客加上一个简单的单页网站。我正在尝试使用博客APC。在安装APC之前,VPS向我发送警报,说WP index.php正在吞噬一切。现在,在安装APC后,这些警报已停止。但是当我使用apc.php检查结果时,我在系统缓存中没有看到任何文件。这里是PHP信息如何";事实上";配置PHP APC?,php,wordpress,caching,apc,Php,Wordpress,Caching,Apc,在有人投票否决这一点并将这一问题深入讨论之前,请投票否决者友好地指出一些更好的资源。谢谢 我有副总裁,它运行一个可湿性粉剂博客加上一个简单的单页网站。我正在尝试使用博客APC。在安装APC之前,VPS向我发送警报,说WP index.php正在吞噬一切。现在,在安装APC后,这些警报已停止。但是当我使用apc.php检查结果时,我在系统缓存中没有看到任何文件。这里是PHP信息 APC Support enabled Version 3.1.9 APC Debugging Disabl
APC Support enabled
Version 3.1.9
APC Debugging Disabled
MMAP Support Enabled
MMAP File Mask no value
Locking type pthread mutex Locks
Serialization Support php
Revision $Revision: 308812 $
Build Date Dec 13 2011 10:12:43
Directive Local Value Master Value
apc.cache_by_default On On
apc.canonicalize On On
apc.coredump_unmap Off Off
apc.enable_cli Off Off
apc.enabled On On
apc.file_md5 Off Off
apc.file_update_protection 2 2
apc.filters apc\.php$ apc\.php$
apc.gc_ttl 3600 3600
apc.include_once_override Off Off
apc.lazy_classes Off Off
apc.lazy_functions Off Off
apc.max_file_size 1M 1M
apc.mmap_file_mask no value no value
apc.num_files_hint 1000 1000
apc.preload_path no value no value
apc.report_autofilter Off Off
apc.rfc1867 Off Off
apc.rfc1867_freq 0 0
apc.rfc1867_name APC_UPLOAD_PROGRESS APC_UPLOAD_PROGRESS
apc.rfc1867_prefix upload_ upload_
apc.rfc1867_ttl 3600 3600
apc.serializer default default
apc.shm_segments 1 1
apc.shm_size 30 30
apc.slam_defense Off Off
apc.stat On On
apc.stat_ctime Off Off
apc.ttl 0 0
apc.use_request_time On On
apc.user_entries_hint 100 100
apc.user_ttl 0 0
apc.write_lock On On
我对到底发生了什么感到困惑。我试图阅读所有可能的来源,但我感到困惑。如何只缓存WP index.php而不缓存其他文件?请注意,它的简单mod_php设置不是FastCGI设置。正如评论所说,我不知道为什么您不希望缓存所有内容 然而,根据研究报告,似乎有一种方法可以做你想做的事情。可以在apc.filters属性中使用正则表达式排除index.php文件之外的所有内容。我不是一个正则表达式专家,但是在你的apc.ini中类似的东西应该会起作用 apc.filter=!索引\.php
你为什么不想缓存所有东西?APC是一个greast操作码缓存。为什么只缓存index.php?APC是字节码缓存,而不是整页缓存,因此我认为您可以缓存所有PHP文件,而不会出现任何问题。@EmilVikström我很乐意,但我无法理解如何使APC缓存所有内容?好了,我刚刚从缓存中排除了apc.php,并且apc必须缓存所有内容,但我在“系统缓存条目”中没有看到任何条目,我现在需要做什么?@VladimirKadalashvili,阅读我的上述评论^Chris,我很乐意这样做,但它没有按预期工作,我已经通过
apc.filter=“index\.php$”排除了apc.php
这部分功能正常,但我在“系统缓存条目”中看不到任何条目