Running WordPress with a nginx+php-fastcgi+memcached backend. Display cached pages without touching PHP, e.g. even if your php backend goes down, cached content will still be served. Requires some kind of memcached-compatible caching plugin for WordPress, e.g. Batcache or W3 Total Cache.
Excellent video.
I tried to use the W3 Total Cache, but it inserts the additional data in the page cache, and nginx receives a corrupted data from memcache, at the top of the site page I see characters like a: 4: {i: 404; b: 0; s: 7: "headers "; a: 0: {} s: 4:" time "; i: 1325687950; s: 7:" content "; s: 39 298"
(I also patch files / wp-content/plugins/w3-total-cache/lib/W3/PgCache.php for easy setup $ memcached _key in nginx. conf)
Do you have any ideas how to make it work?
pendostan2009 1 month ago
@pendostan2009 I had to modify W3 Total Cache. By default, it stores the content as an array in memcached, along with header information (like 404's). You can see the customizations I made here: gist.github com/1561344
Note that you will no longer get 304s, your cache can no longer store the create time so it can't send that in the header, only 200s.
gakoe 1 month ago
@pendostan2009 Another thing to note: PHP will compress data in memcached over a certain threshold, and when nginx reads that data out -- since it's not PHP, it doesn't know how to uncompress data. So you need to change your php.ini or memcache.ini not to compress data < 1MB: memcache.compress_threshold=1048576
gakoe 1 month ago