Compatability with WP SuperCache
-
Hi, I’ve read that SuperCache no longer works properly with Adrotate. What I’ve found is that with SuperCache the ads no longer rotate when I refresh the page, and when I turn off SuperCache they work perfectly.
I’ve looked within the settings for SuperCache and there are two methods that I believe could make it work – could you check it out please and see if it makes sense? If you think the first option would work, it would mean you updating the plugin. I’ll paste in the text from SuperCache:
“How do I make certain parts of the page stay dynamic?
Note: this functionality is disabled by default. You will have to enable it on the Advanced 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 and is the recommended way. Or you can use a WP Super Cache filter to do the job but you can’t use mod_rewrite mode caching. You have to switch to PHP or legacy caching.
WP Super Cache 1.4 introduced a cacheaction filter called wpsc_cachedata. The cached page to be displayed goes through this filter and allows modification of the page. If the page contains a placeholder tag the filter can be used to replace that tag with your dynamically generated html. The function that hooks on to the wpsc_cachedata filter should be put in a file in the WP Super Cache plugins folder unless you use the late_init feature. An example plugin is included. Edit dynamic-cache-test.php to see the example code. There are two example functions there. There’s a simple function that replaces a string (or tag) you define when the cached page is served. The other example function uses an output buffer to generate the dynamic content. Due to a limitation in how PHP works the output buffer code MUST run before the wpsc_cachedata filter is hit, at least for when a page is cached. It doesn’t matter when serving cached pages. See this post for a more technical and longer explanation. To execute WordPress functions you must enable the ‘Late init’ feature on the advanced settings page.”
Unfortunately I can’t simply swap caching plugins as every other one I’ve tried causes a conflict that I can’t track down… so I have to stick with SuperCache.
By the way, apart from this point your plugin does exactly what I want. And the geo location option is something I’ll need in the future. So please tell me there’s a workaround for the caching problem…
The topic ‘Compatability with WP SuperCache’ is closed to new replies.