Support » Fixing WordPress » W3 Total Cache, CDN and Random Post template

  • Hi,

    I’m running a self-hosted WordPress blog. I used the W3 Total Cache plugin along with Amazon CloudFront to set up a CDN (content delivery network). Both the plugin and the CDN are working just fine.

    I’m also using a special page template to generate random posts (on a custom “Random Post Page”). I’ve noticed that when my website is accessed through the CDN the randomization will only work when the Random Post Page is first invoked. Usually, each time the page is invoked, it will randomly display a new set of posts. However, when the site is deliver through the CDN, the Random Post Page will show a random set of posts at first but then, when invoked again, will always display the exact same set of posts. I’m guessing this has to do with the fact that the page is cached.

    W3 Total Cache has an option to exclude element from being delivered through the CDN.

    My question is quite simple: what should I exclude to make sure the Random Post Page isn’t cached? The URL of the page? The location of the template I’m using?

    Thanks a lot,


Viewing 2 replies - 1 through 2 (of 2 total)
  • Got the solution. Instead of using the CDN exclusion list, I use the plugin (W3 Total Cache) “Page Cache” option.

    Once logged in as the administrator, go to W3 Total Cache settings (a tab called “Performance”). Navigate to “Page Cache” and then to the field named “Never cache the following pages:” Finally enter the name of the page. For example, if the URL of your page is http://my_blog/random all you have to do is add the word random in the field.


    Frederick Townes


    Glad you figured it out.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘W3 Total Cache, CDN and Random Post template’ is closed to new replies.