Support » Plugin: WP Super Cache » [Plugin: WP Super Cache] Manually Cache Pages

  • Resolved zombiitv


    I just upgraded from 0.9.9 to 1.2.

    When I visit a page, everything is cached like it is supposed to; however, I have a custom script that I use to control what pages get cached and when. In this script I make the following call:

    do_action( ‘gc_cache’, ‘rebuild’, ‘homepage’ );

    I get this: <!– Page not cached by WP Super Cache. Blank Page. Check output buffer usage by plugins. –>

    I have tried several variations on the URL but nothing is working. This worked fine in version 0.9.9, what changed?

    In the debug log, I get a bunch of messages saying that the buffer is blank – looks like the do_action call is not loading the page.


Viewing 1 replies (of 1 total)
  • zombiitv


    Total hack but this works. Instead of calling the action I’m just calling file_get_content($url). This will load the page from cache if it’s already built or build a new one if it isn’t (just like if you visited the page), if you want it to replace an old page, you’ll need to call prune first. I.E.

    prune_super_cache( $cache_path . 'supercache/' . $postURL . 'index.html', true, true );
    prune_super_cache( $cache_path . 'supercache/' . $postURL . 'index.html.gz', true, true );
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: WP Super Cache] Manually Cache Pages’ is closed to new replies.