• hello,
    I have a problem with the latest version of wordpress – 2.8.4 and clear cache on widgets save.

    what I want is to invalidate the cache when the widgets get saved; I was using wp 2.7.0 up until now and for this task I had the following line:
    add_action( 'widgets.php', 'wp_cache_clean_cache');
    this worked great since for every widget change the page was reloading. but is not the case anymore.

    as an example – I use Text Widget and I want to automatically clear the cache every time I do changes inside the widget content.

    I am looking for a widget action to hook the wp-super-cache clear cache function, but so far I couldn’t find anything useful. if I use the “widget_init” the entire caching process gets broken.

Viewing 1 replies (of 1 total)
  • Thread Starter silviu.scutariu

    (@silviuscutariu)

    I found the answer. will post it here, maybe someone finds it useful. add to the end of the wp-config.php file this line:
    add_action( ‘check_ajax_referer’, ‘wp_cache_clean_cache’);

    so what it does is clear cache on ajax changes in widget section.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: WP Super Cache] clear cache when widgets are saved’ is closed to new replies.