Support » Plugin: WP Super Cache » possible to disable caching of part of a theme template?

  • Resolved pixeline


    WP Super Cache is imho the best cache plugin available. That said, i have a specific need and i’d like to know if it is possible to address it as such or if it could be included in a future release.

    Part of a template needs to fetch a specific image according to the current date. Problem is: since the page is cached (it’s in a sidebar on all pages), it doesn’t do it until the cache is flushed and recreated.

    Would it be possible to “tell” WPSC not to cache a specific part of the template, but do cache the rest, via some kind of easy markup?

    <div id="foo"><?php DONOTCACHE_START;?>
    php code / html markup here...
    <? php

    Thanks for all the work you put into this plugin!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Per the FAQ page for the plugin, there are two ways to accomplish what you’re looking for, pixeline:

    How do I make certain parts of the page stay dynamic?

    Note: from version 1.4 this functionality will be disabled by default. You will have to enable it on the settings page.

    There are 2 ways of doing this. You can use Javascript to draw the part of the page you want to keep dynamic. That’s what Google Adsense and many widgets from external sites do. Or you can use a WP Super Cache tag to do the job but you can’t use mod_rewrite mode caching. You have to switch to PHP or legacy caching.

    The FAQ page has lots more info and some examples of different implementations.

    Hope that helps?


    Ah, i missed that info. Thank you Paul !

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘possible to disable caching of part of a theme template?’ is closed to new replies.