• I’m trying to clear my WP Super Cache from a script. For some reason wp_cache_clear_cache(); isn’t working. Nor is:

    prune_super_cache( $blog_cache_dir, true );
    prune_super_cache( $cache_path . ‘supercache/’, true );

    As far as I can tell, none of the above are having any effect on my cache at all.

    Is there anything I can try or test?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Have you tried the wp_cache_clear_cache() command? You could also enable debugging in the plugin. That should tell you a lot.

    Thread Starter wrybread

    (@wrybread)

    Yes, I ran wp_cache_clear_cache(), no luck.

    And thanks for the tip about turning on debugging. I’m seeing some interesting lines in my log:

    09:09:49 [fname] Cookie detected: wordpress_logged_in_bb5263af5c15c9efc60dc461c01624d5
    09:09:49 [fname] supercache dir: /home/johnhell/radiovalencia.fm/wp-content/cache/supercache/radiovalencia.fm/override/unscheduled_show_processor.php/
    09:09:49 [fname] No wp-cache file exists. Must generate a new one.
    09:09:50 [fname] Cookie detected: wordpress_logged_in_bb5263af5c15c9efc60dc461c01624d5
    09:09:50 [fname] In WP Cache Phase 2
    09:09:50 [fname] Setting up WordPress actions
    09:09:50 [fname] Supercache caching disabled. Only using wp-cache. Non empty GET request.
    09:09:50 [fname] Created output buffer
    09:09:50 [fname] Output buffer callback
    09:09:50 [fname] No closing html tag. Not caching.
    09:09:50 [fname] wp_cache_shutdown_callback: collecting meta data.

    What really has me curious is this one:

    09:09:50 [fname] Supercache caching disabled. Only using wp-cache. Non empty GET request.

    Does that mean I’m not using the WP Super Cache plugin for caching?

    Probably some plugin is populating the $_GET array on every request. Unfortunately you’ll have to disable each plugin or search through your plugins one by one to find the offending one.

    Are you still using wp-super-cache? Give the development version a go (download here) as I changed a restriction on clearing the cache that may have caused this problem.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Trouble clearing the cache from a script…’ is closed to new replies.