Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#9926 closed defect (bug) (fixed)

SimplePie - Use Constant for Cache-Age

Reported by: neoxx Owned by:
Milestone: 2.8 Priority: normal
Severity: normal Version: 2.8
Component: Feeds Keywords: feed, simplepie
Focuses: Cc:


It's good we finally got SimplePie instead of Magpie Rss. Nevertheless, I think the implementation of the cache (refresh) time could be better. - Why not have a constant like CACHE_AGE (as we had for Magpie Rss) or a filter which is used in feed.php / fetch_feed() and class-feed.php / save() and touch().

In that way, users or plugins could also influence the caching behavior and use the new functionality for their needs.

Attachments (1)

9926.diff (710 bytes) - added by neoxx 11 years ago.
fix for feed.php

Download all attachments as: .zip

Change History (5)

#1 @westi
11 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [11446]) Allow plugins to filter the expiration time of the SimplePie cache. Fixes #9926.

11 years ago

fix for feed.php

#2 @neoxx
11 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

westi, thanks for the quick fix!

in addition i attached a patch which makes fetch_feed more flexible. - maybe we could also use a filter. - what do you think?

#3 @westi
11 years ago

Ok after digging into SimplePie further it looks like these two numbers must match in-order for the caching to work reliably.

So I am going to filter both with the same name and remove the context from the filter.

#4 @westi
11 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [11453]) Remove context from wp_feed_cache_transient_lifetime filter and filter in fetch_feed as well. Fixes #9926.

Note: See TracTickets for help on using tickets.