WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
[resolved] Disable W3C for a page and subpages (16 posts)

  1. John Robertson
    Member
    Posted 3 years ago #

    Hey there, I recently set up a job board on my site but I want to disable the caching options for those pages alone. they are listed on pages like http://www.site.com/jobs http://www.site.com/jobs/add and so on. How do I stop the caching for any page with the /jobs/ extension including sub pages of it?

    http://wordpress.org/extend/plugins/w3-total-cache/

  2. kfawcett
    Member
    Posted 3 years ago #

    If you look in the FAQs of the plugin you will find a couple of things you can do to remove caching from specific pages.

    How can I prevent caching directly in my templates etc?

    Several constants are available for these purposes:

    define('DONOTCACHEPAGE', true);
    Disables page caching for a given page.
    define('DONOTCACHEDB', true);
    Disables database caching for given page.
    define('DONOTMINIFY', true);
    Disables minify for a given page.
    define('DONOTCDN', true);
    Disables content delivery network for a given page.
    define('DONOTCACHCEOBJECT', true);
    Disables object cache for a given page.

  3. John Robertson
    Member
    Posted 3 years ago #

    Hmm still a lot of work since it's a semi automatic job board. I'd have to do that for every single job page created :/ Well I guess it's not a huge issue with the cache on.

  4. Frederick Townes
    Member
    Plugin Author

    Posted 3 years ago #

    You can use regular expressions in the never cache the following pages box on the page caching settings tab to handle these cases.

  5. iceq
    Member
    Posted 3 years ago #

    Dea Frederick. So if I want to disable caching for the page:
    http://personal.al-rasid.com/marsad/socialize-share/

    Do I add its full path to that box?

    Also, if I am to use "define('DONOTCACHEPAGE', true);".. where do I put it? is it in a "custom field" of the page ?

  6. robnalexpress
    Member
    Posted 3 years ago #

    @iceq: Do not add the full path. Just add /personal.al-rasid.com/marsad/socialize-share/

  7. iceq
    Member
    Posted 3 years ago #

    Thanx , I will try that.

  8. iceq
    Member
    Posted 3 years ago #

    Is there a way I can make sure it is indeed NOT cached ?

  9. robnalexpress
    Member
    Posted 3 years ago #

    Sure- look at the page source. The W3TC notes at the bottom of my non-cached pages include:

    "Page Caching using disk (enhanced) (request URI is rejected)"

  10. iceq
    Member
    Posted 3 years ago #

    I found no "request URI is rejected" at all.
    Using firefox (I am logged into my WP through it), I get:

    Minified using disk
    Page Caching using disk (user is logged in)
    Served from: personal.al-rasid.com @ 2011-04-24 14:14:22 -->

    With IE (not logged in), I get:

    Minified using disk
    Page Caching using disk (cookie is rejected)
    Served from: personal.al-rasid.com @ 2011-04-24 14:15:41 -->

    can I please make sure it is not cached?
    (same page: http://personal.al-rasid.com/marsad/socialize-share/)

    thanx

  11. robnalexpress
    Member
    Posted 3 years ago #

    Don't know how you can be "sure". Maybe someone more knowledgeable will reply. Except that I'm not having any problems with my pages that are excluded from caching.

  12. iceq
    Member
    Posted 3 years ago #

    Sorry I meant to say, "Can YOU please make sure it it not cached, by viewing that page's source?

    As I showed, the source of the page includes no "request URI is rejected". So does this not mean that it's still cached ?

  13. robnalexpress
    Member
    Posted 3 years ago #

    You can check it yourself. Just right click on the page and select "view source" (when you're not logged in). On this end it reads:

    <!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

    Minified using disk
    Page Caching using disk

    Served from: personal.al-rasid.com @ 2011-04-24 16:34:01 -->

  14. iceq
    Member
    Posted 3 years ago #

    Thank you again. Yes, that is what I did, and still I did not see that it says anywhere "request URI is rejected", and that is why I asked you to (please) verify that.

  15. traffas
    Member
    Posted 2 years ago #

    Was there ever a resolution to know for sure if a page is not being cached? Is it the inclusion of the "request URI is rejected" language that says it's not cached? If that's not there, can we assume it's being cached?

  16. robnalexpress
    Member
    Posted 2 years ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic