The MU forums have moved to WordPress.org

Nightly Build 2005-11-16 w/ Multiple Blogs (4 posts)

  1. plurk
    Inactive
    Posted 18 years ago #

    There is another caching problem as well in the build. When caching is enabled, the root blog is replaced by the first user blog. As well, the admin page uses the URL for the first user blog instead of the root blog.

    Disabling the caching by uncommenting the disable_cache command on line 216 in wp-settings.php would fix this problem and the other one I had posted about earlier. Perhaps this should be done by default in the nightly builds until caching is debugged?

  2. haalaaluu
    Member
    Posted 18 years ago #

    modify as you said and comment out(wp-settings.php) and it seem working but when register new user, it get error and banish all the files under base /

    or because of (wpmu-functions.php)wp_cache_flush(); fix on your other post.

    since i cant debug on, need to wait the other night.. :(
    *sign

    :qw

  3. plurk
    Inactive
    Posted 18 years ago #

    I found it ... I think

    function WP_Object_Cache() {
    global $blog_id;

    if (defined('DISABLE_CACHE'))
    return;

    if (defined('CACHE_PATH'))
    $this->cache_dir = CACHE_PATH;
    else
    $this->cache_dir = ABSPATH.'wp-content/cache/';

    ...

    Right ... so when it is set, the cache_dir is never set. So when I call wp_cache_flush ...

    it runs

    function flush() {
    if ( !$this->cache_enabled )
    return;

    $this->rm($this->cache_dir.'*');
    $this->cache = array ();
    $this->dirty_objects = array ();
    $this->non_existant_objects = array ();
    return true;
    }

    ...

    So if we change it to

    function WP_Object_Cache() {
    global $blog_id;

    if (defined('CACHE_PATH'))
    $this->cache_dir = CACHE_PATH;
    else
    $this->cache_dir = ABSPATH.'wp-content/cache/';

    if (defined('DISABLE_CACHE'))
    return;

    The problem will disappear ... I hope.

  4. plurk
    Inactive
    Posted 18 years ago #

    Actually this might be a better idea:

    function WP_Object_Cache() {
    global $blog_id;

    if (defined('CACHE_PATH'))
    $this->cache_dir = CACHE_PATH;
    else
    $this->cache_dir = ABSPATH.'wp-content/cache/';

    if (defined('DISABLE_CACHE'))
    {
    $this->cache_enabled = false;
    return;
    }

    however I still need it to clear the other arrays out ... since not clearing out the arrays results in the new blog not working so maybe alter flush to be:

    function flush() {
    if ( $this->cache_enabled )
    {
    $this->rm($this->cache_dir.'*');
    }
    $this->cache = array ();
    $this->dirty_objects = array ();
    $this->non_existant_objects = array ();
    return true;
    }

    Yes ... these changes worked ... no deleting this time.

About this Topic