Flushing the RSS cache in WordPress
Published September 3rd, 2013 under General
For the past few days I’ve been driven mildly nuts from dealing with the WordPress feed system. I should have thought of this earlier, but what was causing most of my confusion was that WordPress internally caches the RSS feeds it reads into it. I tracked down the solution whilst rifling through the wp-includes/rss.php file. In there is a definition for the cache age which is set by default to refresh once every hour.
Here is the code from the rss.php file:
<?php
if ( !defined('MAGPIE_CACHE_AGE') ) {
define('MAGPIE_CACHE_AGE', 60*60); // one hour
}
You can override this via your wp-config.php file by declaring the cache age definition before rss.php has run.
<?php // Place the following line in your wp-config.php file ... define( 'MAGPIE_CACHE_AGE', 10 ); // Cache RSS feeds for only 10 seconds