I am pulling an RSS feed from a Wordpress site, and it seems to have got stuck retrieving a cached version through the PHP on my site.
Viewing the RSS url via a browser shows ALL of the 8 or so posts that should be showing but DOESN'T show a post that I deleted as a test.
Outputting the raw data from the feed via the PHP (using LastRSS) it's omitting posts that were created yesterday but is still showing the deleted post.
LastRSS gets the feed using fopen():
if ($f = @fopen($rss_url, 'r')) {
$rss_content = '';
while (!feof($f)) {
$rss_content .= fgets($f, 4096);
}
fclose($f);
}
I've not used Worpress or RSS feeds all that much, so any help would be appreciated.
It seems that the current way to do this in 2020 is with this code:
function turn_off_feed_caching( $feed ) {
$feed->enable_cache( false );
}
add_action( 'wp_feed_options', 'turn_off_feed_caching' );
However, for me, the thing that actually flushed the cache was simply making a change to one of the articles in the feed.
I was trying to switch between Full Text and Summary modes in the plugin and spent several hours trying things until I just tried editing a post and it worked straight away then.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With