[wp-hackers] Fetch Feed

Ryan Frankel ryan.frankel at gmail.com
Sun Oct 28 05:25:29 UTC 2012

I have a quick question about fetch_feed();

1. If I use fetch_feed() multiple times on a page does it cache the results
separately?  I assume it does.
2. Since fetch_feed caches the results is there any way to tell if an
'item' is new? For example, something like...

foreach ( $rss_items as $item ) {
  if( $item->is_new() )
    echo "I'm new!";

I understand that this probably isn't the case due to how SimplePie
functions.  Also, I know I could store the IDs (or whatever) in a file,
cache, or cookie but I figured I would check.  If it isn't the case I would
be interested in anyone's ideas on usable simple solutions for this.

PS: This isn't something critical or something that needs to scale.  It
just has to be maintainable in that I never have to maintain it =).  All
that is at stake here is a weekend project.

Ryan S. Frankel

More information about the wp-hackers mailing list