WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: WP Widget Cache] Apparently not MU-aware (4 posts)

  1. spherical
    Member
    Posted 5 years ago #

    While it can be a feature, the individual settings for widgets carry across blog sites if they are in the same numbered sidebar. Setting them differently from another between users isn't possible if they are in the same position.

    It would also be a Big help if there were a global timeout on the config page, so that all would default to it unless individually changed.

    Other than that, it seems to be working great.

  2. spherical
    Member
    Posted 5 years ago #

    The author would do well, instead of fixing this 'feature', _make_ it a feature and write another version that is MU aware. That, or put in a switch to turn on site-wide for a particular widget in a particular location; leaving all others to cache/refresh at their own rates individually.

    In order for this to work you'd only set the cache time equally for the one widget in all blogs and leave the time field empty (turns off caching) in all others that you don't want to appear in all blogs with the same content. So, you'd set the time to something relatively short and any updates would refresh at the specified time, updating them all. Pretty cool, though not what was intended at first, I'd wager.

  3. Ovidiu
    Member
    Posted 5 years ago #

    unfortunately the author doesn't seem to be aware of the wordpress forums, I'll try and contact him via his homepage :-(

  4. AndrewZhang
    Member
    Posted 5 years ago #

    Hi,
    I can give some tips to make it work on MU, but I never test that.

    Basically it just add 'host' as a param a part of the cache and option key.

    on line 100 of widget-cache.php

    function wgc_get_option($key)
    {
    ....
    //$ops=get_option($key); change this line to
    $ops=get_option($_SERVER['HTTP_HOST'].'_'.$key);
    ....
    }

    on line 474 of widget-cache.php

    function get_widget_cache_key($id)
    {
    //$wckey="wgcache_".$id; change this line to
    $wckey="wgcache_".$_SERVER['HTTP_HOST'].'_'.$id;

    Hope this would work

Topic Closed

This topic has been closed to new replies.

About this Topic