Where does an external RSS feed cache?
-
I finally got the WP internal RSS feed reader working, it is very nice. So far I like the control. This is the code I’m using, but don’t stop reading here my question is below.
<?php include_once(ABSPATH.WPINC.'/rss.php'); // path to include script $feed = fetch_rss('https://www.global-writes.com/authors/xml/michellewinner.xml'); // specify feed url $items = array_slice($feed->items, 0, 4); // specify first and last item ?> <?php if (!empty($items)) : ?> <?php foreach ($items as $item) : ?> <div class="clearingfix"> <h3><a href="<?php echo $item['link']; ?>"><?php echo $item['title']; ?></a></h3> <?php echo $item['published']; ?> <p><?php echo $item['description']; ?></p> </div> <p><hr></p> <?php endforeach; ?> <?php endif; ?>
The feed that I am using is (https://www.global-writes.com/authors/xml/michellewinner.xml) is generated by myself on another site. So I was able to alter the feed to fit the above WP code. But in doing so, each time I made changes, I had to add a revision number to the feed:
michellewinner.xml
michellewinner1.xml
michellewinner2.xml
michellewinner3.xml…Because when I reloaded my page displaying the RSS reader code above it was not picking up the changes I made in the michellewinner.xml file. I tried changing the <pubDate> to make it more recent but it didn’t work.
Since the feed is being sent to my browser already converted to HTML then isn’t it the WP reader that’s caching the xml file?
And how would I clear that cache?
Just for fun I have 2 pages which run the above code but 1 loads
https://www.global-writes.com/authors/xml/michellewinner.xml
and the other
https://www.global-writes.com/authors/xml/michellewinner8.xml
https://culinarytraveler.com/global-writes/
The dam thing just updated on me. Both pages are now the same but I swear the first was not updating and I’ve been working with it for hours. Oh well, anybody understand what was going on?
- The topic ‘Where does an external RSS feed cache?’ is closed to new replies.