• Resolved tempolc

    (@tempolc)


    We have a multiserver wordpress setup, where all the servers are mirrors of each other, let’s call them A, B, and C. The public access the servers through a load balancer.

    All administrative tasks, such as posting new articles, etc will be done by server A.

    We noticed that whenever we make modifications to existing content, while the changes show up on server A, the other two servers, B and C, will continue to serve a cached version of the page.

    If we add in some a query at the end of the page to force a new page to appear (for example, http://www.website.com?query), the correct and updated state of the website will appear.

    We are actually not too sure what exactly is caching the site. We have attempt to purge the cache on w3tc a couple of times but no luck: is it because the “clear all cache” button will only clear the cache on server A (the one we are connected to), and not B and C? In which case, how do we go about clearing the cache to server B and C.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter tempolc

    (@tempolc)

    I would like to add that by manually deleting wp-content/cache on server B and C, the updated and correct version of the page will show up: so it is a matter of B and C not rebuilding its local cache.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @tempolc

    Thank you for reaching out and I am happy to assist you with this.
    Is the domain name the same and can you please confirm your are using Disk: Enhanced as a caching method?
    Thanks!

    Thread Starter tempolc

    (@tempolc)

    A is hosted on its own domain.
    B and C are under the same domain.

    Disk: Enhanced is enabled as a caching method.

    • This reply was modified 2 years, 4 months ago by tempolc.
    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @tempolc

    Thank you for your feedback.
    What you can try is using a Redis cluster.
    Another option may be to define W3TC_CACHE_DIR (in wp-config.php) to be a shared disk mount used by all of the servers. Alternatively, make the cache directory a symlink to a mount point that is shared by all of the servers.

    Thanks!

    Thread Starter tempolc

    (@tempolc)

    I am trying out the Redis cluster approach, provisioned by elasticache.

    I am able to install phpredis which allows me to use redis as a page cache, however, how would I go about configuring the writer and reader endpoints?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Clearing cache in a multiserver setup’ is closed to new replies.