WordPress.org

Ready to get started?Download WordPress

Forums

WP Super Cache
How to stop sp cache fram cashing our forum page (5 posts)

  1. dominick41
    Member
    Posted 3 years ago #

    Can you stop Super Cache from caching the our forum....It causes a problem when they submit, causing what they type to just disappear, Thanks!
    Dominick

  2. Donncha O Caoimh
    Member
    Plugin Author

    Posted 3 years ago #

    See the developer docs linked from the plugin documentation. You can define a constant, "DONOTCACHEPAGE" on any pages that you don't want cached.

  3. wearebase
    Member
    Posted 3 years ago #

    Hi,

    Sorry if this seems a silly question, but I am having the same issue.

    I have a plugin I wrote which swaps the css for an accessibility friendly version but the page reloads with the cached version of the site so the wrong css.

    It swaps the css with the code below:

    <?php if ($_COOKIE["style"] == "on" ) {
    	accessible style sheet
    	} else {
            normal style sheet
    } ?>

    I know i need to add an argument to say dont load cached content if this cookie is set, in this instance where do I define the constant? and how?

    Thanks for your help,

    Best,
    Matt

  4. dominick41
    Member
    Posted 3 years ago #

    so do you have to do this each forum generates a new page

  5. Donncha O Caoimh
    Member
    Plugin Author

    Posted 3 years ago #

    wearebase - add a check for that cookie in the rewrite rules for supercache if you're using mod_rewrite caching. You'll also probably want to modify the cache_key in wp-cache-phase1.php. Have a look at that file and the developer docs linked from the main supercache page.

    dominick41 - just add it to your forum config file probably. Some file that's loaded by every forum page. This is PHP code, not HTML of course.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic