[wp-trac] [WordPress Trac] #11585: WordPress should cache failed feed fetches so as to avoid overloading feed sources

WordPress Trac noreply at wordpress.org
Mon Jul 29 05:52:57 UTC 2013


#11585: WordPress should cache failed feed fetches so as to avoid overloading feed
sources
-------------------------------+-----------------------------
 Reporter:  Denis-de-Bernardy  |       Owner:
     Type:  enhancement        |      Status:  new
 Priority:  normal             |   Milestone:  Future Release
Component:  Performance        |     Version:  2.9
 Severity:  normal             |  Resolution:
 Keywords:  has-patch          |
-------------------------------+-----------------------------

Comment (by peterchester):

 Just confirmed that the error message for a failed feed only showed up on
 the first save before this fix so that's not a new issue if it's an issue
 at all.

 I'm also adding a new patch with a solution for separating the cache
 timing from the error cache timing. Initial testing on that came out
 positively. To test cache timings use the filters
 'wp_feed_cache_transient_lifetime' (the existing one) vs.
 'wp_feed_error_cache_transient_lifetime' (the new one)

 To test, add the following to your functions.php file to easily see the
 timeouts if you load a functional feed vs. a broken one.

 {{{
 add_filter( 'wp_feed_cache_transient_lifetime',
 'my_feed_cache_transient_lifetime' );
 function my_feed_cache_transient_lifetime() {
         return 30; // 30 second cache life time for successful content
 }

 add_filter( 'wp_feed_error_cache_transient_lifetime',
 'my_feed_error_cache_transient_lifetime' );
 function my_feed_error_cache_transient_lifetime() {
         return 5; // 5 second cache life time for errors.
 }
 }}}

 I tested broken feeds by entering a url in the RSS widget that i knew was
 totally bunk and one that was loading xml that made Simplepie sad vs. my
 control of a feed on a live site that was working fine.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/11585#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list