Title: [Plugin: WP Super Cache] clear cache when widgets are saved
Last modified: August 19, 2016

---

# [Plugin: WP Super Cache] clear cache when widgets are saved

 *  [silviu.scutariu](https://wordpress.org/support/users/silviuscutariu/)
 * (@silviuscutariu)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-clear-cache-when-widgets-are-saved/)
 * 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](https://wordpress.org/support/users/silviuscutariu/)
 * (@silviuscutariu)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-clear-cache-when-widgets-are-saved/#post-1265508)
 * 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.

 * 1 reply
 * 1 participant
 * Last reply from: [silviu.scutariu](https://wordpress.org/support/users/silviuscutariu/)
 * Last activity: [16 years, 4 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-clear-cache-when-widgets-are-saved/#post-1265508)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
