WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: WP Super Cache] How do I know it's really caching? (33 posts)

  1. wilef
    Member
    Posted 6 years ago #

    Everything seems to be running smooth except I always get a '<!-- Dynamic Page Served (once) in 0.377 seconds -->' message when testing it out. The Dashboard shows pages being cached, but how do I know for sure? I've deleted my cookies and browsing history, but I'm still seeing dynamic pages. Does it use IP address to determine who to serve dynamic pages to?

    In case I can't figure this one out, could someone go to http://www.2pstart.com and tell me if they are getting a cached page or a dynamic page?

    Thanks!

  2. Donncha O Caoimh
    Member
    Posted 6 years ago #

    Looks like it's not working properly. Have you looked in wp-content/cache/ and wp-content/cache/supercache/ ? Any files in there?

  3. wilef
    Member
    Posted 6 years ago #

    Yes there are many files in there.

  4. Anonymous
    Unregistered
    Posted 6 years ago #

    Yes, it catch, but it returns to generate the requests.

    <!-- Dynamic Page Served (once) in 0.397 seconds -->

    reload:

    <!-- Dynamic Page Served (once) in 0.365 seconds -->

    again:

    <!-- Dynamic Page Served (once) in 0.320 seconds -->

    ...

    Good luck!
    Regards

  5. Donncha O Caoimh
    Member
    Posted 6 years ago #

    Any errors in your error log?

  6. wilef
    Member
    Posted 6 years ago #

    I'm assuming you're referring to the error_log file in my plugins directory. No errors there. I don't see another error log file anywhere else.

  7. Donncha O Caoimh
    Member
    Posted 6 years ago #

    Check your php.ini. It would be unusual to find the error log in a web accessible directory!

  8. wilef
    Member
    Posted 6 years ago #

    I don't have access to the server's php.ini file as I am on shared hosting.

  9. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    What is the content of your .htaccess file?

  10. wilef
    Member
    Posted 6 years ago #

    htaccess file says:

    ErrorDocument 401 "<p>Error 401</p><p>Authorization Required.</p>"
    ErrorDocument 403 "<p>Error 403</p><p>Forbidden.</p>"
    ErrorDocument 404 "<p>Error 404</p><p>Doocument Not Found.</p>"
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    AddDefaultCharset UTF-8
    RewriteCond %{REQUEST_METHOD} !=POST
    RewriteCond %{QUERY_STRING} !.*s=.*
    RewriteCond %{QUERY_STRING} !.*attachment_id=.*
    RewriteCond %{QUERY_STRING} !.*wp-subscription-manager=.*
    RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress|wp-postpass_).*$
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz -f
    RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz [L]

    RewriteCond %{REQUEST_METHOD} !=POST
    RewriteCond %{QUERY_STRING} !.*s=.*
    RewriteCond %{QUERY_STRING} !.*attachment_id=.*
    RewriteCond %{QUERY_STRING} !.*wp-subscription-manager=.*
    RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress|wp-postpass_).*$
    RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f
    RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html [L]
    </IfModule>
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

  11. Donncha O Caoimh
    Member
    Posted 6 years ago #

    It's probably something to do with your DOCUMENT_ROOT. In very rare cases some people seem to have problems with it. You could try replacing DOCUMENT_ROOT with the path to your install.

    Also make sure no other plugin is dying and stopping WordPress from completing requests properly.

  12. wilef
    Member
    Posted 6 years ago #

    I'm not sure that did anything. Just so I'm understanding you right, I replaced DOCUMENT_ROOT in 2 places in the .htaccess file, and for syntax, it now looks like this:

    RewriteCond %/home/___/public_html/wordpress/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz -f

    and

    RewriteCond %/home/___/public_html/wordpress/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f
    (where the blank is the folder name for my site on the server)

    Does that look right? If so, I'm still seeing dynamic pages, maybe someone else can check it out and tell me if they still look dynamic to you. Thanks again.

  13. Donncha O Caoimh
    Member
    Posted 6 years ago #

    Get rid of the % before and after the paths. That should help!

  14. wilef
    Member
    Posted 6 years ago #

    thanks, got that now. but I'm afraid I still don't see a difference (at least I'm still getting dynamic pages served).

    I REALLY appreciate all your help. Let me know if you have any other ideas.

    Is there anything I should be asking my host? Are there some settings that they may have turned off that would prevent the plugin from serving cached pages?

  15. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    wilef: I think you're misunderstanding how the super cache works. The plugin does not serve the super-cached pages at all. That's sort of the whole point. They get served by those .htaccess rules entirely.

  16. wilef
    Member
    Posted 6 years ago #

    Otto42,
    Thanks for the clarification. The question still stands though, the site is definitely not serving cached pages at all and I'm wondering if there's anything else you guys can think of that would be causing this. Thanks again.

  17. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    Well, the only reason it would not be working is:
    a) your htaccess rules are still wrong or
    b) you have it turned off.

    It's really that simple. Here's an example of working rules:

    # BEGIN WPSuperCache
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    AddDefaultCharset UTF-8
    RewriteCond %{REQUEST_METHOD} !=POST
    RewriteCond %{QUERY_STRING} !.*s=.*
    RewriteCond %{QUERY_STRING} !.*attachment_id=.*
    RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress|wp-postpass_).*$
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteCond %{DOCUMENT_ROOT}/blog/wp-content/cache/supercache/%{HTTP_HOST}/blog/$1/index.html.gz -f
    RewriteRule ^(.*) /blog/wp-content/cache/supercache/%{HTTP_HOST}/blog/$1/index.html.gz [L]
    
    RewriteCond %{REQUEST_METHOD} !=POST
    RewriteCond %{QUERY_STRING} !.*s=.*
    RewriteCond %{QUERY_STRING} !.*attachment_id=.*
    RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress|wp-postpass_).*$
    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]
    </IfModule>
    
    # END WPSuperCache

    My blog folder's name is "blog" in this case.

  18. nemo-maritime
    Member
    Posted 5 years ago #

    I am having the same issue.... I havel looked at my cache and super cache folder, and there are files there. When I go to any of the pages that show as cached for that file, they show on the bottom
    <!-- Dynamic Page Served (once) in 0.XXX seconds -->
    I am with hostgator hosting, and would like this to come out working as my site is getting bigger and bigger traffic... any new suggestions? I have WP 2.5.1 and Super-Cache 0.8.5.

  19. nemo-maritime
    Member
    Posted 5 years ago #

    Also, I have another site, on the same server, where in the bottom of the source code it shows:
    <!-- Dynamic Page Served (once) in 0.524 seconds -->
    <!-- Cached page served by WP-Super-Cache -->
    <!-- Compression = gzip -->
    Does this meant that its cached?

  20. lostdeviant
    Member
    Posted 5 years ago #

    Seems like for many of us the new(er) versions are caching but not serving the cached pages even after going through the troubleshooting in the readme.

    #1 ( first time loading a page after logging out)
    <!-- Dynamic Page Served (once) in 0.946 seconds -->
    <!-- Cached page generated by WP-Super-Cache on 2008-12-25 11:25:44 -->

    #2 ( reloaded the same page)
    <!-- Dynamic Page Served (once) in 0.946 seconds -->
    <!-- Cached page generated by WP-Super-Cache on 2008-12-25 11:25:44 -->
    <!-- Compression = gzip -->

  21. lostdeviant
    Member
    Posted 5 years ago #

    I've done some testing on a few sites that haven't been upgraded to 2.7 and had an older version of supercache .83 and .85. BOTH of them were running wp-mu 2.6.x and both were SERVING the cached page on reload (at least they said they were).
    As soon as I upgraded to supercache .86 it only generated the cached page. it no longer said they were being served.

    As a final test, I deleted supercache .86 from one site and uploaded the .85 backup from the other. It worked again.

    .86 is broken :-(

  22. nemo-maritime
    Member
    Posted 5 years ago #

    So
    <!-- Dynamic Page Served (once) in 0.524 seconds -->
    <!-- Cached page served by WP-Super-Cache -->
    <!-- Compression = gzip -->
    means that its not caching right? wth can I do to fix it?

  23. lostdeviant
    Member
    Posted 5 years ago #

    nemo, it is broken if it always says it is serving dynamic pages like in my example...

    Donncha, are you still on vacation?

  24. chaz7979
    Member
    Posted 5 years ago #

    Looks to me like its working for both of you. Your code looks like the same code I am seeing at the bottom of the authors homepage.

  25. nemo-maritime
    Member
    Posted 5 years ago #

    So its working? Or is lostdeviant right?

  26. lostdeviant
    Member
    Posted 5 years ago #

    well considering how the readme says that it should show the cached page as "served" if it is working then the newest version doesn't work as I said I had to go back one version for the cached page served message to appear.

    Additionally I had gotten a nice account suspension from one of my web hosts.

    why?
    They mentioned too much mysql use (which I reduced by rewriting some scripts to get rid of features, etc.)

    AND

    A request to CACHE my blog pages.
    if .86 were caching my pages and SERVING them, then why would they tell me that?

  27. chaz7979
    Member
    Posted 5 years ago #

    All I can say is that the authors site says

    "<!-- Dynamic Page Served (once) in 0.483 seconds -->
    <!-- Cached page generated by WP-Super-Cache on 2009-01-07 04:22:56 -->
    <!-- Compression = gzip -->"

    So, if that is not correct, then I am sure he will be implementing a fix soon???

    Take a look at his site for yourself... are you seeing the same thing I am?

  28. lostdeviant
    Member
    Posted 5 years ago #

    I believe my webhost, but I really hope Donncha will get back from vacation and let us know what is happening since .85 does give me the messages and .86 doesn't.

    His readme clearly states:

    "How do I know my blog is being cached? =

    View the source of any page on your site. When a page is first created, you'll see the text "Dynamic Page Served (once) in X.XXXXX seconds" at the end of the source code. On reload, a cached page displays, "Cached page served by WP-Super-Cache"."

  29. loller6661
    Member
    Posted 5 years ago #

    Hi,

    I'm having the same issue I think.

    WP super cache says its caching. in my ftp folder all wp super cached files are there int he right folders (lots of posts have already a cached page)

    However when loading my homepage or a post for that matter I always receive:

    <!-- Dynamic Page Served (once) in 0.391 seconds -->
    <!-- Cached page generated by WP-Super-Cache on 2009-01-10 14:10:28 -->
    <!-- Compression = gzip -->

    seconnd load attempt:

    <!-- Dynamic Page Served (once) in 0.391 seconds -->
    <!-- Cached page generated by WP-Super-Cache on 2009-01-10 14:10:28 -->
    <!-- Compression = gzip -->

    (at the time of this post it is 16:35:10)

    So the (once) should not be present?

  30. loller6661
    Member
    Posted 5 years ago #

    Installed 0.8.5 to be sure:

    first load:

    <!-- Dynamic Page Served (once) in 1.738 seconds -->

    second load

    <!-- Dynamic Page Served (once) in 1.738 seconds -->
    <!-- Cached page served by WP-Super-Cache -->
    <!-- Compression = gzip -->

    So I guess it is ok

Topic Closed

This topic has been closed to new replies.

About this Topic