Memcached support exists for multiple server configurations. So if you have a standalone server you probably don’t need to use memcached. While nginx does support direct access to memcached apache does not and as such it is not possible to use memcached in the manner you mention.
Thread Starter
babadi
(@babadi)
Yep, I’m interested in a multi-server configuration. So the memcached option for page caching is specifically intended for nginx, then? I don’t think I saw nginx on the list of supported web servers, but it’d be good news to me if that works, as I’ve been thinking about giving nginx a try anyway. Thanks!
So the memcached option for page caching is specifically intended for nginx, then?
No, that comment was an aside.
Use PECL memcache (on your web servers) + memcached on one of them (or various instances if needed). More specifics than this require consultation. The tools are there for you to decide.
Thread Starter
babadi
(@babadi)
My original question may have been unclear, but I’m not looking for help making this work. I already have W3TC working 100% on apache with memcached. What I’m trying to do is better understand “how” it works. Given that apache cannot serve content directly out of memcached, I assume that means that my requests for cached pages are still hitting PHP, and the W3TC plug-in is intercepting the requests, pulling the cached page out of memcached, and returning it. Is that correct?
Even if it was intended as an aside, I think the idea letting W3TC cache pages into memcached and then having nginx serve content directly out of there is pretty intriguing. The most immediate issue I see is that W3TC uses MD5 hashes to generate its memcached keys, and I don’t see a way of generating MD5 hashes in the nginx config. But I’ll look into it more. Thanks for the idea.