Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Curtiss Grymala

    (@cgrymala)

    In order to avoid using too many resources, the plugin caches content from other blogs when it pulls it in. In the current version of the plugin, that cache time is set to 1 hour, but you can filter it to reduce the amount of time it’s cached by hooking into the pcsc-transient-timeout filter.

    Thread Starter transmitstudio

    (@transmitstudio)

    Ah, so it does. Just checked the post and it has updated. Thank you for clarifying and thank you for an excellent plugin.

    Plugin Author Curtiss Grymala

    (@cgrymala)

    You’re very welcome. Thanks for the feedback.

    Thread Starter transmitstudio

    (@transmitstudio)

    Curtiss would you mind providing an example of how to hook into that filter?

    Plugin Author Curtiss Grymala

    (@cgrymala)

    Sure thing:

    add_filter( 'pcsc-transient-timeout', 'adjust_pcsc_timeout' );
    function adjust_pcsc_timeout( $to ) {
        return 60; /* set the timeout to 60 seconds */
    }

    Just be careful not to return 0. Then, for some reason, instead of creating a transient that expires immediately, WordPress creates a transient that never expires.

    Thread Starter transmitstudio

    (@transmitstudio)

    Thanks for your quick response Curtiss.

    The code is not working but it’s possible I’m using it in the wrong place. This is on a WP Multisite installation and I pasted your code in the functions.php file of the main theme first (no effect) and then added it also to theme for the blog I’m using the shortcode in (again no effect).

    Is there somewhere else I should be pasting your code?

    Thanks again for your assistance.

    Plugin Author Curtiss Grymala

    (@cgrymala)

    Since you’re using multisite, you might want to just put that code in a blank PHP file, then upload that PHP file to wp-content/mu-plugins. That way, you can be sure it will take effect.

    Just to be clear, are you using version 0.3.2.1 of the plugin? I’m pretty sure that’s the first version that included this filter.

    Also, the existing cache needs to expire before the new timeout will take effect (so, if the post content was already cached 5 minutes ago, you’ll have to wait 55 minutes until your change will occur). Thanks.

    Thread Starter transmitstudio

    (@transmitstudio)

    I just downloaded the plugin from the repository today. It says version 0.3.2 so I’m sure it’s the latest version. The content was just cached so that may be the issue.

    Clearly I have a lot to learn about caching ??

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Posts do not update in multisite’ is closed to new replies.