WordPress.org

Ready to get started?Download WordPress

Forums

WP Super Cache
Wrong pages cached with WP Super Cache (7 posts)

  1. RexStubbins
    Member
    Posted 3 years ago #

    I am using the WP Super Cache plugin and all works fine until there are a large number of standard cached files (WP-Cache not WP-Super-Cache.)

    On a number of occasions when the number of WP-Cache files exceeds 1000 the root page is cached incorrectly. The structure of my urls are:

    http://www.mywebsite.com/store (This one gets super cached)

    Then I have a lot of pages that are dynamic under the root page. For example:

    http://www.mywebsite.com/store?aurl=detail/0123456789
    http://www.mywebsite.com/store?aurl=detail/9012345678
    http://www.mywebsite.com/store?aurl=detail/8901234567

    etc.

    The dynamic urls are simply WP-Cache files which is fine. After 1000 or so of the dynamic urls being cached the root page (www.mysite.com/store) no longer views the correct page. It shows one of the dynamic pages and it seems to be random as to which one it shows.

    To fix this I have to turn off WP Super Cache, clear the cache, and then turn it back on again. Everything works fine until a large number of files gets cached again.

    Please help!

  2. nhowarth
    Member
    Posted 3 years ago #

    I encountered the same problem when I was trying to diagnose an issue I reported yesterday - http://wordpress.org/support/topic/plugin-wp-super-cache-latest-version-0998

    When visiting my homepage using my wife's laptop, a 'search results' page was displayed. I didn't take much notice at the time.

    Perhaps the two issues are related?

  3. Donncha O Caoimh
    Member
    Plugin Author

    Posted 3 years ago #

    RexStubbins - reduce your cache expiry so there are less of those files. I'm not sure what causes that problem to happen however. Are there any errors in your php error log?

    nhowarth - I'll reply on your thread.

  4. RexStubbins
    Member
    Posted 3 years ago #

    donncha,

    Thank you for your fast response and for the great plugin.

    I will reduce the expiry time to reduce the number of files. However, Shouldn't this plugin be able to handle a large number of cached pages? I am serving cached pages to bots as I think that it would be good for SEO (you know. the whole page speed thing.)

    The bots are now triggering the page caches but they may be causing the problem. The error log for yesterday showed a typical failure like this:

    [Tue Jan 11 12:33:17 2011] [error] [client 93.158.150.20] (104)Connection reset by peer: FastCGI: comm with server "/home/dir/mywebsite.com/cgi-bin/dispatch.fcgi" aborted: read failed
    [Tue Jan 11 12:33:17 2011] [error] [client 93.158.150.20] FastCGI: incomplete headers (0 bytes) received from server "/home/dir/mywebsite.com/cgi-bin/dispatch.fcgi"
    [Tue Jan 11 12:35:53 2011] [error] [client 93.158.150.20] FastCGI: comm with (dynamic) server "/home/dir/mywebsite.com/cgi-bin/dispatch.fcgi" aborted: (first read) idle timeout (60 sec)
    [Tue Jan 11 12:35:53 2011] [error] [client 93.158.150.20] FastCGI: incomplete headers (0 bytes) received from server "/home/dir/mywebsite.com/cgi-bin/dispatch.fcgi"
    [Tue Jan 11 12:37:03 2011] [error] [client 93.158.150.20] FastCGI: comm with (dynamic) server "/home/dir/mywebsite.com/cgi-bin/dispatch.fcgi" aborted: (first read) idle timeout (60 sec)
    [Tue Jan 11 12:37:03 2011] [error] [client 93.158.150.20] FastCGI: incomplete headers (0 bytes) received from server "/home/dir/mywebsite.com/cgi-bin/dispatch.fcgi"

    93.158.150.20 happens to be the Yandex bot

    I'm not exactly sure if this was the error log that I should be looking at. This was under the http log directory. I did not see a PHP error log.

    Please let me know if you need further information. I would like to be able to have 1000's of pages cached if possible.

  5. Donncha O Caoimh
    Member
    Plugin Author

    Posted 3 years ago #

    The plugin can handle a huge number of supercached files but not wp-cache files. Those files hold meta data about the page so when it comes time to clean up the files it's not enough to look for the oldest, you have to check the meta data. That means opening up each and every one.

    You're seeing some odd collision between cache files and I can't explain why it's happening unfortunately. Can you change your site will accept urls like /store/0123456789/ instead? You could use mod_rewrite to redirect the old urls to the new one.

  6. RexStubbins
    Member
    Posted 3 years ago #

    I've been trying to rewrite these URLs but I am not that good at regular expressions. I think I am having a problem with the slash in the parameter value:

    http://www.mywebsite.com/store?aurl=detail/8901234567

    Any ideas?

  7. RexStubbins
    Member
    Posted 3 years ago #

    I think that I've come up with the correct Rewrite rules:

    RewriteRule store/(.*)/(.*)/$ /store?aurl=$1/$2
    RewriteRule store/(.*)/(.*)$ /store?aurl=$1/$2

    However; I'm not exactly sure where to place these lines within the existing htaccess file. I've tried at the end but it doesn't work. I've tried within the <IfModule mod_rewrite.c></IfModule> tags for the WP Super Cache rewrites and the WordPress rewrites but then I get a server error.

    Do you have any insight into where to put this?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic