Support » Plugin: W3 Total Cache » [Plugin: W3 Total Cache] Xcache clarification

  • This is more of a question to clarify my own curiosity than a support one.

    If Xcache is an opcode caching mechanism, how does this help serve static content out of memory? If I keep my page cache set to ‘Opcode: Xcache’, am I in fact still dynamically generating pages every time, simply with the benefit of the opcode being pre-cached already? Or is there some other feature of Xcache that you’re taking advantage of, where it does memcache-like caching of the output of whole URLs e.g.?

    I was intrigued by your recent comment that single server sites might want to try advanced file based caching after all.

    I’m running W3 Total Cache on nginx with Xcache set for a 128 meg cache size for a small blog right now. At 64 megs, the Xcache admin panel would still show the PHP cache max out after less than half an hour.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Frederick Townes


    Opcode caches require PHP to be invoked to cache compiled scripts and access stored objects. When you enable opcode as the storage engine for page caching, the entire uncompressed and gzip compressed versions of a given page are stored in the opcode cache and returned if they have not expired.

    Different web servers have different levels of peak performance when working with PHP. Nginx or Litespeed are typically much faster than Apache for example when running PHP. Mileage varies, but your web server is (by default) optimized for reading from disk rather than memory and use of memory caching is geared towards alleviating specific bottlenecks, typically related to execution time for PHP rather than total response time for static objects.

    So in a nutshell, while Xcache can not only cache compiled script opcode, but also the output, thus bypassing even executing the opcode, there is a slight overhead in invoking PHP?

    Sounds like I’ll give advanced disk based cache a try then for my site.

    Plugin Author Frederick Townes


    You can’t bypass exucuting opcode, that’s what happens when you have it installed and PHP is invoked. Instead of creating a page, if that file already exists in opcode (memory), it is returned instead of executing compiled scripts. Invoking PHP is slower than just returning a file from disk (in general). Nginx is not officially supported with latest functionality now.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: W3 Total Cache] Xcache clarification’ is closed to new replies.