WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] WP_CACHE not working (3 posts)

  1. DreamerFi
    Member
    Posted 7 years ago #

    I ran into the weird problem that every request for a page did NOT work on the first attempt, but DID work on the second attempt, as shown in this terminal session (domain name changed to example.com);

    %telnet http://www.example.com 80
    Trying 194.151.97.132...
    Connected to http://www.example.com.
    Escape character is '^]'.
    GET http://www.example.com/index.php HTTP/1.0

    HTTP/1.1 404 Not Found
    Date: Tue, 15 Aug 2006 07:46:27 GMT
    Server: Apache
    X-Powered-By: PHP/5.1.4
    Set-Cookie: PHPSESSID=qv944snjdbtfqtaukv77ecab00; path=/
    Expires: Thu, 19 Nov 1981 08:52:00 GMT
    Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    Pragma: no-cache
    X-Pingback: http://www.example.com/xmlrpc.php
    Status: 404 Not Found
    Vary: Accept-Encoding,User-Agent
    Content-Length: 1
    Connection: close
    Content-Type: text/html; charset="UTF-8"

    Connection closed by foreign host.
    %telnet http://www.example.com 80
    Trying 194.151.97.132...
    Connected to http://www.example.com.
    Escape character is '^]'.
    GET http://www.example.com/index.php HTTP/1.0

    HTTP/1.1 200 OK
    Date: Tue, 15 Aug 2006 07:46:41 GMT
    Server: Apache
    X-Powered-By: PHP/5.1.4
    Set-Cookie: PHPSESSID=83jrskdpmdh0eonoekboi47s32; path=/
    Expires: Thu, 19 Nov 1981 08:52:00 GMT
    Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    Pragma: no-cache
    Vary: Accept-Encoding,User-Agent
    Connection: close
    Content-Type: text/html; charset=UTF-8

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">

    <head profile="http://gmpg.org/xfn/11">

    (etc, rest of html skipped)

    When I comment the line define('WP_CACHE', true); in wp-config.php, the problem diseappears.

    Anybody else seen this?

  2. DreamerFi
    Member
    Posted 7 years ago #

    (hmm - forum software mucked up the urls - read "http://" everywhere where a link is inserted by the software..)

  3. DreamerFi
    Member
    Posted 7 years ago #

    Found it. In wp-content/plugins/wp-cache/wp-cache-phase2.php, change in the function wp_cache_ob_end, the call to ob_end_clean() to ob_end_flush().

Topic Closed

This topic has been closed to new replies.

About this Topic