OpCache not caching

☆樱花仙子☆ 提交于 2019-12-10 22:03:27

问题


ive recently activated opcache but it doesn't appear to be working. It's confirmed activated via phpinfo()

As you can see 0 hits 1 miss 1 cached script (opcached gui)

What am I missing?

Server is a Linux server centos 6.5 vps PHP 5.5

A bit more info about opcache configuration

opcache_enabled true

cache_full false

restart_pending false

restart_in_progress false

used_memory 8.54 MB

free_memory 503.46 MB

wasted_memory 0 bytes

current_wasted_percentage 0.00%

buffer_size 4194304

used_memory 446.41 kB

free_memory 3.56 MB

number_of_strings 4895

num_cached_scripts 1

num_cached_keys 1

max_cached_keys 65407

hits 0

start_time Sat, 26 Jul 14 23:20:32 +0000

last_restart_time never

oom_restarts 0

hash_restarts 0

manual_restarts 0

misses 1

blacklist_misses 0

blacklist_miss_ratio 0.00%

opcache_hit_rate 0.00%


回答1:


This looks like you are using cgi rather than mod_php5. The shared memory area (SMA) is used for both, but it only persists request-to-request for the latter.




回答2:


I had this issue on a WHM/cPanel server today. As TerryE suggests, you are probably running CGI or suPHP. Change to DSO.



来源:https://stackoverflow.com/questions/24976116/opcache-not-caching

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!