WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: WP Super Cache] How can I tell if it has cached? (12 posts)

  1. MikeonTV
    Member
    Posted 5 years ago #

    in the FTP folder wp-content/cache/supercache/mydomain.net/ it shows all the posts have a folder. But I cant tell if it actually is cached when the traffic sees it.

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    Load the page in a browser that you don't use (one that won't have any cookies or such), or on another computer. View the page source. Look at the bottom of the page, there will be a comment telling you how it was cached.

  3. MikeonTV
    Member
    Posted 5 years ago #

    Ok I opened in Safari (windows) and noticed this
    <!-- Dynamic Page Served (once) in 0.560 seconds -->
    <!-- super cache -->
    after the </html>

    Am I set?

  4. Samuel Wood (Otto)
    Tech Ninja
    Posted 5 years ago #

    The <!-- super cache --> comment means that it came from the cache.

  5. wilef
    Member
    Posted 5 years ago #

    Otto,
    I did basically the same thing here as Mike. Could you clarify a bit? You say the line '<!-- super cache -->' means it came from the cache, but it also says 'Dynamic Page'. Doesn't that mean it's NOT cached? I thought a cached page returns a different line like "Cached Page Served..."

    Thanks.

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

    The "Dynamic Page" was in the original page... So that bit got cached too. :)

    If it says super cache, then it's cached. Really.

  7. uppaway
    Member
    Posted 5 years ago #

    after enabling, I read a warning message under "Directly Cached Files (advanced use only)"

    WARNING! /home1/(DB name taken out)/public_html/ is writable. Please make it readonly after your page is generated as this is a security risk.

    Should I do something, or just let it go as is?

    Thank you!

  8. Deadpan110
    Member
    Posted 5 years ago #

    Hiya,

    I'm looking into installing this onto my WordPress mu site and I can't seem to find any information about the hooks built into the cache or if anyone has asked this question before...

    I would like to know if you can:

    when a page is cached, replace my 'This page: 52 queries in 0.172 seconds.' text within my footer - with 'This page: Cached on [some php date('format', since epoch time)]' timestamped in the cached page.

    Is this indeed possible or should it be a feature request?

    I think it would be a great edition to my wpmu home page to demonstrate to users that their blogs are super fast to non-logged in users... and the results they can see for themselves by logging in and out.

    I look forward to your reply :)

  9. Donncha O Caoimh
    Member
    Posted 5 years ago #

    WP Super Cache hooks are described in the readme, but you can't do that using them. You should use the wp_footer action to print the date generated. That will get cached along with the rest of the page.

  10. anschorr
    Member
    Posted 5 years ago #

    i never see either of those things at the bottom of my page source. there are pages in the cache dir but i always see

    WP-Cache

    * 0 cached pages
    * 0 expired pages

    WP-Super-Cache

    * 0 cached pages
    * 0 expired pages.

    is there any other way to tell it is working? or am i doing something wrong?
    thanks

  11. anschorr
    Member
    Posted 5 years ago #

    ah, now i got it! deleted the advanced-cache.php file and cleared the cache files that were there! i forgot i had installed and uninstalled advanced cache last year. good stuff. hope this helps my server load!

  12. Deadpan110
    Member
    Posted 5 years ago #

    @donncha : I have made a tiny modification to wp-cache-phase2.php that enables my dynamically served page to output:

    This page: 61 queries in 0.192 seconds.

    On caching, WP Super Cache changes that section and saves the page with:

    This page: Cached by WP Super Cache on October 18th, 2008 at 1:42 am.

    This works on my wpmu install and should work fine within WordPress default by simply marking your section with:

    <!--cache_stats-->
    <strong>This page:</strong> <?php echo get_num_queries(); ?> queries in <?php timer_stop(1); ?> seconds.
    <!--/cache_stats-->

    An example of it in action can be found within my footer at IND-Web.com

    Would you like me to send you the file to look at?

    PS, Many thanks for such a great plugin :)

Topic Closed

This topic has been closed to new replies.

About this Topic