WordPress.org

Support

Support » Plugins and Hacks » WP Super Cache » [Plugin: WP Super Cache] Preload files

[Plugin: WP Super Cache] Preload files

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Donncha O Caoimh

    @donncha

    wp-content/cache/supercache/

    Thanks.
    I’d looked in there before since the read me file suggested they would be in there. It wasn’t at all what I expected. There are a few files in there — maybe 10% of my total posts (if that many.) Some are from 2010, some all the way back to 2007. Not at all what I expected.

    Isn’t it supposed to go backwards in time, getting all the 2010 first? Then the 2009 etc?

    Also, preload indicates it’s finished. So, only a very few are going to be pre-loaded.

    Hi Donncha,

    I recently installed Super Cache, and activated it, and don’t see the Super Cache in wp-content/cache/supercache/

    Also, I don’t see a .htaccess file, except at root level. Your install docs say it should be at:
    wp-content/cache/.htaccess

    In the Tester Tab, when I list all cached files, there is noting in the list.

    Any thoughts on what I am doing wrong?

    Also, I get this error after activating, in the Advanced Tab:
    Directly Cached Files
    Warning! /home/content/w/w/w/www8020vision/html/ is writable. Please make it readonly after your page is generated as this is a security risk.

    I am not sure what path that is. It doesn’t make sense for the structure of my directory.

    Thanks for any help you can provide.

    jay

    Plugin Author Donncha O Caoimh

    @donncha

    Jay – you’re on shared hosting I presume? You’re seeing a virtual folder, while that path above is the real path to where your site lives.

    Have you tried the debug system? That should tell you a lot about why things aren’t working.

    In wp-cache.php, on line 2390, you select all ID from the table posts where post_status is “publish” when caching in preload mode:

    $posts = $wpdb->get_col( "SELECT ID FROM {$wpdb->posts} WHERE post_status = 'publish' ORDER BY post_date DESC LIMIT $c, 100" );

    Thing is, not all items where post_status is “published” are of post_type = “post”, but also of post_type = “nav_menu_item”.

    Caching nav_menu_item will generate a 404 error and slow things down. post_name for nav_menu_item is always the same as ID, that is a number.

    To solve this, WP Super Cache must also check that post_type = “post” in its SQL statement:

    $posts = $wpdb->get_col( "SELECT ID FROM {$wpdb->posts} WHERE post_status = 'publish' AND post_type='post' ORDER BY post_date DESC LIMIT $c, 100" );

    Plugin Author Donncha O Caoimh

    @donncha

    liangzai – thanks, I’ve just added this to the development version.

    I’ve installed wp super cache – it appears to be working well.
    However, I’m receiving regular emails with the subject line “Preload may have stalled” and with the content “Preload has been restarted.”
    What does this indicate? Is there a problem?
    Thanks in advance for any help on this.

    Plugin Author Donncha O Caoimh

    @donncha

    Sometimes the preload stops (there are many reasons) but now it continues instead of stopping completely.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Plugin: WP Super Cache] Preload files’ is closed to new replies.
Skip to toolbar