Xcache install


Could someone help - hosting support installed xcache on my VPS. I've made setting in php.ini

But when I look from xcache admin - nothing is cached and Cache Init Time always = current time

Settings below in attached file.


PHP version 5.3.13

CENTOS 5.8 i686

Did anyone meet this situation? Maybe I need to check some prerequisition for xcache?



Hi Rust,

Looking at the screen shots I think XCache is set up. As you browse web pages on your site you will see the cached count increase, once cached your hits counter will start incrementing. If you have access to XCache administration panel then click on the List PHP and you will see a list of CS-Cart PHP files cached.

Looking at the XCache setup I would turn Off this option xcache.stat (having this On will degrade performance slightly)

xcache.var_size = 32M reduce this to 1M (CS-cart will not make use of variable caching)

xcache.size = 128M reduce this to 64M (this is usually enough to cache all php files for one CS-Cart website)

Once you have completed development of your website then you could also increase xcache.ttl 7200 (currently 2hours) to something like 28800 (8 hours). After this time if no hits have occurred then the file will expire, and will have to re-cached again. If your website has some traffic then most frequently used files will never expire.

One last item in the XCache admin panel to check is OOMs, this indicates the number of files which have not been cached when XCache allocated memory is full. If you see OOM increasing then you may need to increase xcache.size (just increase in 4M steps until no OOMs).

Note if you make any changes to a template file or php file then you will need to clear XCache (this will only be necessary during development or upgrades).

Attached is an example of XCache Admin (Using multi cores)


Thanks a lot Adrian for recommendation. I did as you write. But it seems that xcache restarts every time I refresh statistics in xcache admin. Nothing is cached except 4 files:





Maybe it is problem with mm_path? Now xcache.mmap_path= /dev/zero

The only time XCache would restart is if you restart the master PHP process (depending on your setup this could be Apache restarted or FPM-PHP restarted). When you view the List PHP from XCache Admin you can check creation time and access times for each cached php file. If you browse other pages from your cs-cart website then you should start seeing more php files under List PHP.

Hi Guys, thanks for the valuable advice in this thread. i too have Xcache installed and I seem to have the same problem as the OP. My cache seems to be created the moment i refresh the page, plus the amount of cached files goes up or down each time I refresh the page. I set the TTL to 28800 so I thought the files would be held in there for hours? They seem to be changing second by second.

If anyone has any insights Id really appreciate it thank you.

Found the solution to my problem, and possibly the ops too. If you are running suExec, xcache and APC cant build a cache. You need a php handler that is not set per user. More info here; Trying to use APC but it seems to be clearing out? | LiteSpeed Support Forums