title: Disable caching in WordPress Feeds generation
body: <p>i'm working on a plugin that adds another parameter to feeds, i want to add a numberOfItems on the url and the feed returns that number of articles. I dont want to use the builtin option from WP Admin because the feed will be added on other websites with different number of items, it's a little bit complicated, the point is i need this implementation. i've added something like </p>
  
  <pre><code>function _my_custom_option( $option )
  {
  global $wp_query, $wp_rewrite;;
  remove_filter( 'pre_option_posts_per_rss', '_my_custom_option' );
  //$number = get_query_var('number');
  $number = $wp_query-&gt;query_vars['numberOfItems'];
  
  if(isset($number))
      $option = $number;
  else
          $option = 10;
  //$wp_rewrite-&gt;flush_rules();
  add_filter( 'pre_option_posts_per_rss', '_my_custom_option' );
  return $option;
  }
  add_filter( 'pre_option_posts_per_rss', '_my_custom_option' );
  </code></pre>
  
  <p>It seems that the feed is cached somehow and doesnt generate with the number of items, because when i add paged=2, it works. But if i change on page=2 numberOfItems with another number, it doesnt change. Plus, i added some junk text in wp-includes >feed-rss2.php just to verify if it cached or not. And it doesnt show after the first 2-3 page refreshes. </p>
  
  <p>To be honest, i'm stuck, i don't know how to approach this, i've looked on the wordpress code and i dont see where the caching is done. </p>