[wp-hackers] Clearing Feed Cache?

Potkanski, Jason jpotkanski at tribune.com
Thu Jul 15 15:02:44 UTC 2010


Is there a way to set this up so one type of feed has a shorter cache lifetime?

Say I use xml sitemaps and want the sitemap feed to be 5 minutes but the rss, rss2, atom etc as 12 hours.

-Jason Potkanski
Tribune Technology

-----Original Message-----
From: wp-hackers-bounces at lists.automattic.com [mailto:wp-hackers-bounces at lists.automattic.com] On Behalf Of Frank Bueltge
Sent: Thursday, July 15, 2010 2:10 AM
To: wp-hackers at lists.automattic.com
Subject: Re: [wp-hackers] Clearing Feed Cache?

add_filter( 'wp_feed_cache_transient_lifetime', create_function( '$a',
'return 1800;' ) );

use this filter to set a new time for the cache.
more also in my post: http://wpengineer.com/feed-cache-in-wordpress/

Best regards
Frank


On Thu, Jul 15, 2010 at 8:50 AM, Andrew Nacin <wp at andrewnacin.com> wrote:
>
> If you look in fetch_feed(), you'll see a few filters. One of them allows
> you to alter the cache length. I think there's an easy way to clear it as
> well but if not then that would be a good patch.
>
> On Thu, Jul 15, 2010 at 12:22 AM, Otto <otto at ottodestruct.com> wrote:
>
> > Yes, the feed is cached for 12 hours. If you look in the options
> > table, you can find the feed cached there.
> >
> > -Otto
> >
> >
> >
> > On Wed, Jul 14, 2010 at 11:16 PM, Raj <list at expost.org> wrote:
> > > Hi,
> > >
> > >
> > >
> > > I have been using fetch_feed to work with external feeds in my plugin. I
> > > have noticed that even after some times in the feed have been removed,
> > the
> > > feed items remain in the simplepie object returned by the fetch_feed
> > > function. Does this mean that the feed is automatically cached? How  can
> > I
> > > clear this cache?
> > >
> > >
> > >
> > > Raj Sekharan
> > >
> > > _______________________________________________
> > > wp-hackers mailing list
> > > wp-hackers at lists.automattic.com
> > > http://lists.automattic.com/mailman/listinfo/wp-hackers
> > >
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
_______________________________________________
wp-hackers mailing list
wp-hackers at lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers


More information about the wp-hackers mailing list