WordPress.org

Ready to get started?Download WordPress

Forums

Super cache does not cache for first-time visitor (5 posts)

  1. crazlunatic
    Member
    Posted 6 years ago #

    Super-cache does not work for first-time visitors. If the first-time visitor clicks on a second page, that page will be cached but the landing page is never cached. How can I fix this? With 80 percent of my visitors as first time, this is a big contributor to high CPU usage. Thanks.

  2. Donncha O Caoimh
    Member
    Posted 6 years ago #

    That's strange. Any page visited should be cached. Do you have any plugins that set a cookie? Please use error_log() to debug wp-cache-phase2.php - look in wp_cache_ob_callback() first and then work your way back.

  3. crazlunatic
    Member
    Posted 6 years ago #

    How do I use error log () to debug?

  4. Donncha O Caoimh
    Member
    Posted 6 years ago #

    http://ie.php.net/error_log

    I generally use it like this:
    error_log( "blah\n", 3, "/tmp/err.txt" );

    That will print "blah" to /tmp/err.txt

  5. beernews
    Member
    Posted 6 years ago #

    You can tell I'm working quite hard at this..I attempted debugging and have no idea if I did it right. Remember that I'm not a coder. Just trying to get wp-super-cache to work. After "debugging" if I even did it right, I got this error in my browser:

    Parse error: syntax error, unexpected T_GLOBAL in ["my directory"]/wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 12

    This is the 12th line:

    error_log( "blah\n", 3, "/tmp/err.txt" ) global $wp_cache_gzip_encoding;

    Is that how I use error log() to debug?

    Remember, my issue is that the super cache folder never gets created. wp-cache works just fine but the super-cache side never seems to trigger.

Topic Closed

This topic has been closed to new replies.

About this Topic