WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: W3 Total Cache] How does page-level caching work? (6 posts)

  1. babadi
    Member
    Posted 4 years ago #

    This plug-in looks really cool. Something I'm having a bit of trouble understanding is how page-level caching works with memcached. It looks like the enhanced disk-level caching works like wp-super-cache, in that it generates a hierarchy of cached files and uses Apache rewrite rules to serve content directly from there. I'm not aware of Apache being able to serve content directly out of memcached though. So how does that work exactly?

    I haven't managed to find any documentation that explains how this works, but if there's something out there I missed, a link would be greatly appreciated.

    Thanks!

  2. Frederick Townes
    Member
    Posted 4 years ago #

    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.

  3. babadi
    Member
    Posted 4 years ago #

    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!

  4. Frederick Townes
    Member
    Posted 4 years ago #

    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.

  5. babadi
    Member
    Posted 4 years ago #

    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.

  6. Frederick Townes
    Member
    Posted 4 years ago #

    Correct.

Topic Closed

This topic has been closed to new replies.

About this Topic