php apc.filters 语法
我无法理解 PHP APC 配置中 apc.filters 指令所需的格式。 (特别是对于多个模式)
手册 说 “以逗号分隔的 POSIX 扩展正则表达式列表。”
假设我不想想要缓存两个文件,即 brooklyn.php 和 boston.php
我输入以下条目:
apc.filters = "-(.*)/布鲁克林\.php$, -(.*)/波士顿\.php$"
它仍然缓存
我也尝试过
apc.filters = "-(.*)/brooklyn\.php$", "-(.*)/boston\.php$" 仍然
缓存
如果有人可以编写具有多种模式的示例表达式,我将非常感激。
I am having trouble understanding the format required by the apc.filters directive in PHP APC configuration. (particularly for more than one patterns)
The manual says
"A comma-separated list of POSIX extended regular expressions."
Let's say i don't want to cache two files namely brooklyn.php and boston.php
I put the following entry:
apc.filters = "-(.*)/brooklyn\.php$, -(.*)/boston\.php$"
It still caches
I also tried
apc.filters = "-(.*)/brooklyn\.php$", "-(.*)/boston\.php$"
Still caches
I would really appreciate if someone could write a sample expression that has multiple patterns.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
这难道不会起到作用吗?
或者
Wouldn't this do the trick?
or
迫不及待地想看看您是否能得到任何答案。我永远无法让“dis-include”工作(我的相关问题:apc.filters by path?< /a>) 仅通过关闭
cache_by_default
和 +ing 而不是 -ing 路径对我有用。Can't wait to see if you get any answers. I could never get the "dis-include" to work (my related question: apc.filters by path?) Only worked for me by turning off
cache_by_default
and +ing instead of -ing paths.我遇到了同样的问题,终于找到了方法。
您只需删除每个逗号后面的空格即可。
i had the same problem and finally found the way to go.
You just have to remove spaces after each comma.
这有效:
this works: