[wp-hackers] Feed Caching

Andrew Nacin wp at andrewnacin.com
Sat Sep 18 06:15:42 UTC 2010


On Sat, Sep 18, 2010 at 12:22 AM, iPhoneclub <jp.horn at gmail.com> wrote:
>
> How do I pass a specific feed url and a specific (shorter than
> default) cache time to this filter in my theme's functions.php? I need
> one feed to refresh every 5 minutes, while caching other feeds for one
> hour (I have five external feeds in total).


Exactly as Dougal suggested in the link you provided. [0]

While the filter being leveraged there, wp_feed_cache_transient_lifetime, is
not new in 3.0, the $url argument is passed as context for the first time in
3.0. You're not passing a URL; you're filtering the cache time based on the
URL that you're given. The function in that post remains both relevant and
correct.

[0]
http://dougal.gunters.org/blog/2010/05/20/quick-tip-faster-wordpress-news


More information about the wp-hackers mailing list