Stop your site’s WordPress Feeds from being cached
Ever have a site wherein you needed to implement “Cacheing” your content for speed? If so, good for you. Unfortunately most (as far as i have encountered) WordPress Plugins, when you clear the cache, do not clear the feeds cache..
If you didn’t need to update feeds this is fine. But if you need feeds to be as current as the need to be, here is a nifty trick to stop your feeds from being cached.
Just insert this code into the functions.php of the site whose feed you do not want to be cached.
Source
If you didn’t need to update feeds this is fine. But if you need feeds to be as current as the need to be, here is a nifty trick to stop your feeds from being cached.
Just insert this code into the functions.php of the site whose feed you do not want to be cached.
function turn_off_feed_caching( $feed ) {
$feed->enable_cache( false );
}
add_action( 'wp_feed_options', 'turn_off_feed_caching' );
Source
