Now, I am using PHP OPcache in my wiki. But I saw this parameter that $wgMainCacheType
,and the manual showed the following:"CACHE_ACCEL
– APC, APCu, WinCache or XCache if available.." OPcache is an upgraded version of APCu. So, should I set CACHE_ACCEL
?
Topic on Project:Support desk
You could try that.
Performance is not much change...
OPcache is for caching PHP code when it's executed, so PHP doesn't need to reparse every PHP file each time. This is not controlled by MediaWiki. The caching that MediaWiki controls is storing data into a cache, so when it needs to be retrieved, it can be retrieved from the cache and not from database or recomputed by doing expensive queries. You should check first if OPcache can actually store data, otherwise MediaWiki may be just ignoring this setting.
I can be sure that the OPcache extension has been installed.
How can I check OPcache can store data?
If you're using this OPCache, it can't store data in memory. It only saves the compiled PHP sources. This is not an upgraded version of APCu
Alright, I got it. So, should I set CACHE_NONE
in the parameter?
You may want to leave it as the default: CACHE_ANYTHING. It will try to use the database for caching, which should be better than no caching at all, unless the database is slow or you have space restrictions.