Support » Plugin: W3 Total Cache » Cache custom page – API or php hooks?

  • I’ve searched, but can’t find the exact answer I’m looking for — or something isn’t working for me.

    The basic issue is that I have a WordPress Page which is using a php template to create an XML file for an external app. Unlike much other content on the site, it is actually not customized per user. It is also very db intensive. So I’d like to cache it.

    I have tried to figure out a way to cache only this page, but am flummoxed. In the php file, I’ve put:

    define('DONOTCACHEPAGE', false);
    define('DONOTCACHEDB', false);

    But this doesn’t cache. I thought it might, but no.

    Is there something within this .php script/file that can flag it to be cached. I assume it would be flushed at other page cache flushes.

    Thanks for listening

Viewing 3 replies - 1 through 3 (of 3 total)
  • I think I’ve found some other plugins that will allow me to have granular caching for a particular page, as well as a time/age setting.

    I’d rather not install a new plugin (imho minimizing them minimizes conflicts). I’m curious if anyone had suggestions as to how I might be able to implement this in W3 Total Cache.

    If you use disk:basic you can cache any wordpress url in wordpress. I have tested it using custom query_vars and a template_include filter.

    use Disk:basic caching then check:

    Cache URIs with query string variables

    in the page cache config tab.

    You can then use exclude pages you don’t want cached with regex in the never catch these pages box on the advanced section.

    Sweet — that’s a great suggestion.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Cache custom page – API or php hooks?’ is closed to new replies.