Forums

[Plugin: W3 Total Cache] debug info (22 posts)

  1. sslhbala82
    Member
    Posted 2 years ago #

    <!-- W3 Total Cache: Page cache debug info:
    Engine: disk (enhanced)
    Key: activity/_default_.html.gzip
    Caching: enabled
    Status: not cached
    Creation Time: 0.615s
    Header info:
    X-Powered-By: W3 Total Cache/0.8.5.2
    Set-Cookie: bp-message-type=deleted; expires=Sun, 03-May-2009 12:24:53 GMT; path=/
    X-Pingback: *********************
    Content-Type: text/html; charset=UTF-8
    Pragma: public
    Expires: Mon, 03 May 2010 13:24:54 GMT
    Last-Modified: Mon, 03 May 2010 12:24:54 GMT
    Cache-Control: max-age=3600, public, must-revalidate, proxy-revalidate
    Vary: Accept-Encoding, Cookie
    Etag: 3b280f6fc3127df00e92518a6cc515b9
    Content-Encoding: gzip
    -->

    db cache:
    <!-- W3 Total Cache: Db cache debug info:
    Engine: apc
    Total queries: 84
    Cached queries: 0
    Total query time: 0.009
    -->

    i activated cache but cache says not cached in the debug info. any help to furthut proceed.

    Thanks,
    Bala

    http://wordpress.org/extend/plugins/w3-total-cache/

  2. Frederick Townes
    Member
    Posted 2 years ago #

    Could you please try the development version http://wordpress.org/extend/plugins/w3-total-cache/download/ and submit a bug submission report if the problem persists?

  3. Null_
    Member
    Posted 2 years ago #

    I'm seeing a similar problem, I originally tried using xcache for page/minify/db, but nothing was showing as cached in debug. I then switched to disk (enahnced where applicable), and now I see queries being cached, but never the page.

    <!-- W3 Total Cache: Page cache debug info:
    Engine: disk (enhanced)
    Key: buyers/tip-2/_default_.html.gzip
    Caching: enabled
    Status: not cached
    Creation Time: 0.081s
    Header info:
    X-Powered-By: W3 Total Cache/0.8.5.2
    X-Pingback: *********************************
    Content-Type: text/html; charset=UTF-8
    Last-Modified: Tue, 04 May 2010 21:02:56 GMT
    Vary: Accept-Encoding, Cookie
    Pragma: public
    Expires: Tue, 04 May 2010 22:02:56 GMT
    Cache-Control: max-age=3600, public, must-revalidate, proxy-revalidate
    Etag: 18913c8a27fb78c6f285009971fe67fd
    Content-Encoding: gzip
    -->

    I downloaded the development version as advised, but the results above are the same.

  4. moepstar
    Member
    Posted 2 years ago #

    I can confirm this behaviour for XCache based caching: According to the debug output nothing ever gets cached - Not the minifying, the page and no DB queries, even though it is set up to the exact opposite :P

  5. Frederick Townes
    Member
    Posted 2 years ago #

    Is xcache properly caching scripts for you? Can you verify in the control panel? Are there errors in your apache error log? Are you using fastcgi?

  6. moepstar
    Member
    Posted 2 years ago #

    XCache itself is working properly, i see lots of cache & variable hits in my monitoring (Munin). Webserver is NGINX and PHP is invoked as (fast)CGI using PHP-FPM.

    I'll try the development version tomorrow to see if that maybe fixes the problems.

  7. Null_
    Member
    Posted 2 years ago #

    Went back to xcache as well, as thats what I'd like to get working. Using apache (not fcgi), xcache is working, I see hits via its admin panel, but still nothing showing as cached via w3tc. DB queries and pages both return "Enabled" and "Not Cached".

    I'm using the most recent dev version.

    <!-- W3 Total Cache: Page cache debug info:
    Engine: xcache
    Key: w3tc_170cfab40c13563753d804f48b40a98a_page_6666cd76f96956469e7be39d750cc7d9_gzip
    Caching: enabled
    Status: not cached
    Creation Time: 0.154s
    Header info:
    X-Powered-By: W3 Total Cache/0.8.5.2
    Last-Modified: Wed, 05 May 2010 19:17:45 GMT
    Vary: Accept-Encoding, Cookie
    Pragma: public
    Expires: Wed, 05 May 2010 20:17:45 GMT
    Cache-Control: max-age=3600, public, must-revalidate, proxy-revalidate
    Etag: 1be94fc39b210c9f28f8ff5715d43ade
    Content-Encoding: gzip
    X-Pingback: ***********************88
    Content-Type: text/html; charset=UTF-8
    -->

  8. zxb2
    Member
    Posted 2 years ago #

    I can confirm this as well. Nginx here. XCache itself is working - I see variable hits being counted in the admin panel - but W3T says its not serving from the cache (edited SQL info out btw).

    <!-- W3 Total Cache: Db cache debug info:
    Engine: xcache
    Total queries: 30
    Cached queries: 0
    Total query time: 0.005
    SQL info:
    -->

    <!-- W3 Total Cache: Page cache debug info:
    Engine: xcache
    Key: w3tc_4dd0ca5fb9a6a625faeb659d6652078e_page_b8e4030c85fef30e424100adea385cad
    Caching: enabled
    Status: not cached
    Creation Time: 0.662s
    Header info:
    X-Powered-By: PHP/5.3.0
    Pragma: public
    Expires: Thu, 06 May 2010 00:59:46 GMT
    Last-Modified: Wed, 05 May 2010 23:59:46 GMT
    Cache-Control: max-age=3600, public, must-revalidate, proxy-revalidate
    Vary: Cookie
    Etag: 730c4a2c8bad6ad30fe7f70edab06caf
    Content-Type: text/html; charset=UTF-8
    -->

  9. Null_
    Member
    Posted 2 years ago #

    don't suppose either of you could share your nginx conf rewrite rules that work with w3tc? Looking to migrate to nginx, but not unless I can get w3tc working with it.

  10. moepstar
    Member
    Posted 2 years ago #

    Null_: using XCache-based caching you don't need the rewrite rules, besides for minifying - which are shared in one of the recent threads about it here.

    Regarding disk-based caching, the rules would have to be adopted - i'll look into those in the coming days but won't make any promise if i'll be able to translate them :)

  11. Null_
    Member
    Posted 2 years ago #

    oh excellent! Now if only we can get xcache-based caching working then :)

  12. Frederick Townes
    Member
    Posted 2 years ago #

    I can't duplicate this issue. Please edit lib/W3/Cache/Xcache.php file:

    on line 40: return xcache_set($key, serialize($var), $expire);
    change to: return xcache_set($key, $var, $expire);
    on line 51: return @unserialize(xcache_get($key));
    change to: return xcache_get($key);

  13. Null_
    Member
    Posted 2 years ago #

    so in my case, I had xcache.var_size left at the default of 0. I changed that, and am now seeing the sql queries properly cached via xcache, though my page still isn't.

    When making the changes you specified, originally it gave me errors due to var_size being 0, once fixed, all of my pages then stop working completely with the changed lines.

    <!-- W3 Total Cache: Page cache debug info:
    Engine: xcache
    Key: w3tc_170cfab40c13563753d804f48b40a98a_page_ebf6ffc164b4d05f6df4c90ed0597ceb_gzip
    Caching: enabled
    Status: not cached
    Creation Time: 0.077s
    Header info:
    X-Powered-By: W3 Total Cache/0.8.5.2

  14. Frederick Townes
    Member
    Posted 2 years ago #

    You no longer need to change those lines in light of the fact that xcache was improperly configured. See if the caching works after reverting the changes.

  15. Null_
    Member
    Posted 2 years ago #

    The caching of sql queries works after the change is reverted, however the page caching is still showing as not-cached, shown in my above post.

  16. Frederick Townes
    Member
    Posted 2 years ago #

    Does page caching work in basic mode?

  17. Null_
    Member
    Posted 2 years ago #

    yes, when using disk, I get.

    <!-- W3 Total Cache: Page cache debug info:
    Engine: disk
    Key: w3tc_170cfab40c13563753d804f48b40a98a_page_d38dd2d9f595dc58d064c70e4f434e23_gzip
    Caching: enabled
    Status: cached
    Creation Time: 0.001s
    Header info:
    X-Powered-By: W3 Total Cache/0.8.5.2

    When using disk (enhanced), I don't see any output at all for page caching.

  18. Null_
    Member
    Posted 2 years ago #

    to clarify, I still see the output telling me sql queries were cached via xcache in both cases, but when using disk (enahnced) for page, the page specific caching doesn't display, though it does for just "disk" page caching.

  19. moepstar
    Member
    Posted 2 years ago #

    I've noticed the same behaviour regarding the missing disk cache info - but only when the cached file has been served which seems to have been created on disk without the info.

    Regarding the rewrite rules for NGINX, i came up with the following ones, however please note that they only are partially working (the commented out minifying part didn't really work for me, however i'm unsure if my theme just doesn't really want to be minified or if the rewrite rule(s) are at fault):

    #File exists? By all means, send it!
    if (-f $request_filename) {
    break;
    }
    
    set $w3tc_file '';
    set $w3tc_uri $request_uri;
    
    #No rewriting for these
    if ($request_uri ~* "\/wp-admin\/|\/xmlrpc\.php|\/wp-(app|cron|login|register)\.php|wp-.*\.php|index\.php") {
    set $w3tc_uri '';
    }
    
    if ($request_uri ~* "wp-comments-popup\.php|wp-links-opml\.php|wp-locations\.php") {
    set $w3tc_uri '';
    }
    
    #When POSTing, do not rewrite
    if ($request_method = POST) {
    set $w3tc_uri '';
    }
    
    #Bypass cache if there's query string appended
    if ($query_string) {
    set $w3tc_uri '';
    }
    
    #Cookie exists? No rewriting for you!
    if ($http_cookie ~* "comment_author_|wp-postpass_|wordpress_\[a-f0-9\]\+|wordpress_logged_in" ) {
    set $w3tc_uri '';
    }
    
    #Are we requesting a possibly minified CSS/JS?
    #if ($request_uri ~* "^.+\.(css|js)$") {
    #rewrite ^/wp-content/w3tc/min/([a-z0-9\-_]+)\.(include(-footer)?(-nb)?)\.(css|js)$ /wp-content/w3tc/min/index.php?gg=$1&g=$2&t=$5 last;
    #}
    
    #Still in the game? Lets set our destination
    if ($w3tc_uri ~ ^(.+)$) {
    set $w3tc_file /wp-content/w3tc/pgcache/$1_default_.html;
    }
    
    #See if the file we want to request exists, then rewrite
    if (-f $document_root$w3tc_file) {
    rewrite ^(.*)$ $w3tc_file break;
    }
    
    #Everything else may be passed on to WordPress
    if (!-e $request_filename) {
    rewrite ./index.php last;
    }

    The parts i'm especially unsure what they're trying to achieve are the last two of the original rewrite rules:

    RewriteCond /var/www/belangloserscheissdreck.de/webroot/wp-content/w3tc/pgcache/$1/_default_.html%{ENV:APPEND_EXT} -f
        RewriteRule (.*) wp-content/w3tc/pgcache/$1/_default_.html%{ENV:APPEND_EXT} [L]

    Maybe Frederick can shed some light into what the {ENV:APPEND_EXT} is trying to achieve.

    Also, maybe there's someone more well versed with adapting rewrite rules to NGINX than me that wants to help us out a bit ;)

  20. Frederick Townes
    Member
    Posted 2 years ago #

    I still see the output telling me sql queries were cached via xcache in both cases, but when using disk (enahnced) for page, the page specific caching doesn't display, though it does for just "disk" page caching.

    Bugs I've found with disk enhanced and WP 3/MU will be fixed in the next release.

    Maybe Frederick can shed some light into what the {ENV:APPEND_EXT} is trying to achieve.

    {ENV:APPEND_EXT} is used to determine which cache file to return by suffix; gzip or deflate or empty string. If browser supports gzip (Accept-Encoding contains 'gzip') APPEND_EXT env variable is set to '.gzip'. If browser supports deflate (Accept-Encoding contains 'deflate') APPEND_EXT env variable is set to '.deflate'. If browser doesnt support compression, APPEND_EXT is empty (undefined) nothing is appended.

    aybe there's someone more well versed with adapting rewrite rules to NGINX than me that wants to help us out a bit ;)

    Full nginx support is coming in the final release.

  21. Null_
    Member
    Posted 2 years ago #

    sounds great! Any ideas on the xcache page caching potentially not working, as it displays Cache Enabled, but never cached?

  22. Frederick Townes
    Member
    Posted 2 years ago #

    It's really hard to guess without checking out your error logs.

Topic Closed

This topic has been closed to new replies.

About this Topic