• Hello there. I’ve installed the plugin and I’ve stared it successfully but now wherever I am logged out, the plugin generate new cache file when I refresh the page. Now instead of static pages, I get static pages generated all the time which make much more cpu usage. Is this normal?!
    I want opposite behavior, because I am the only one logged in. I want the posts to be cached for the anonimous users, not for me.
    And the settings are like default.
    Do someone have the same problem?

Viewing 7 replies - 16 through 22 (of 22 total)
  • I’m sorry, please disregard my last post.

    KenMorse’s tweaks to Acolonna’s tweaks is what does the trick, not mine.

    Question: Isn’t it better to rearrange the RewriteConds such that the conditions most frequent to occur and least expensive to test come first?

    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteCond %{HTTP_REFERER} !(google|yahoo|msn)\. [NC]
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
    # RewriteCond %{HTTP_USER_AGENT} !^.*(Android|2.0\ MMP|240x320|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|hiptop|IEMobile|iPhone|iPod|KYOCERA/WX310K|LG/U990|MIDP-2.0|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|Playstation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|Windows\ CE|WinWAP).*
    RewriteCond %{REQUEST_METHOD} !POST
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{DOCUMENT_ROOT}/blog/wp-content/cache/supercache/%{HTTP_HOST}/blog/$1/index.html.gz -f
    RewriteRule ^(\w+(?:/\w+)*)/*$ /blog/wp-content/cache/supercache/%{HTTP_HOST}/blog/$1/index.html.gz [L]

    P.S. I snuck a line there because I’m using the Landing Sites plugin.

    With both tweaks applied to the rewrite rules the super cache works like charme, except for the homepage, as mentioned by Acolonna above – on my page it is not cached at all, a new cache page is generated with every call.

    Pinoy.ca, very acute suggetsion. The first attempt at optimization that can be performed on any conditional in any language.
    Great!

    As regarding the homepage I must admit I haven’t taken the time to tackle it yet, I’ve been covering thousands of kilometers on my bike to get back home from my holidays.

    Will get back to work tomorrow and hunt it down. If anyone comes up with an idea, be my guest!

    Pinoy.ca – thanks, must try some of those tweaks.

    The main reason for the rewrite rules being broken for some is because of the many ways WordPress can be tested. You can put it in:
    1. In the root folder.
    2. In a directory.
    3. In a directory but loaded from the root folder.

    Can you put it in a directory and load it off another directory?

    I spent a lot of time trying all the different permutations but if anyone wants to help, the code that generates the .htaccess rules is in wp-cache.php

    I’d just like to chime in and let you know that the malformed rewrite rules bit me, too. I’ve been trying to figure out why WP-super-cache isn’t working for some time, and today I finally realized it was a problem with the rewrite rules. In particular, my blog is installed at “/blog/” instead of “/”, so these rules don’t work:

    RewriteCond %{DOCUMENT_ROOT}/blog/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f
    RewriteRule ^(.*) /blog/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html [L]

    Instead, I needed:

    RewriteCond %{DOCUMENT_ROOT}/blog/wp-content/cache/supercache/%{HTTP_HOST}/blog/$1/index.html -f
    RewriteRule ^(.*) /blog/wp-content/cache/supercache/%{HTTP_HOST}/blog/$1/index.html [L]

    A similar modification was needed for the gzip rules of course. Alternatively, this also works (and might be simpler to add to the rewrite rules generation code):

    RewriteRule ^(.*) /blog/wp-content/cache/supercache/%{HTTP_HOST}%{REQUEST_URI}index.html [L]
    RewriteCond %{DOCUMENT_ROOT}/blog/wp-content/cache/supercache/%{HTTP_HOST}%{REQUEST_URI}index.html [L]

    I really appreciate all the work you put into this plugin, and I hope these comments help. ??

    Thanks dpark – I think this problem should be fixed in the development version (wait at least 15 minutes until after the timestamp on this post for it to regenerate). Can you give it a go?

    Not sure why I didn’t use the REQUEST_URI variable.

Viewing 7 replies - 16 through 22 (of 22 total)
  • The topic ‘[Plugin: WP Super Cache]The plugin make new cache page all the time’ is closed to new replies.