[wp-trac] [WordPress Trac] #3950: enhance fetch_rss to optionally
have a variable cache timeout
WordPress Trac
wp-trac at lists.automattic.com
Sat Mar 10 10:47:30 GMT 2007
#3950: enhance fetch_rss to optionally have a variable cache timeout
-------------------------+--------------------------------------------------
Reporter: DD32 | Owner: anonymous
Type: enhancement | Status: new
Priority: normal | Milestone: 2.2
Component: General | Version: 2.2
Severity: normal | Keywords: has-patch
-------------------------+--------------------------------------------------
'''Issue:''' Plugin developers want to check a RSS feed only once per
day.[[BR]][[BR]]
'''Current Solution:''' Define MAGPIE_CACHE_AGE to the timeout value
before retrieving RSS feed.[[BR]][[BR]]
'''Issues with that solution:''' If multiple plugins want to use different
timeouts, its impossible, Only the first item that uses fetch_rss may
specify a timeout.[[BR]][[BR]]
'''More Elegant solution:''' Allow fetch_rss() to accept a cache timeout:
fetch_rss($rssFeedUrl,24*60*60) [[BR]][[BR]]
'''Other Notes:'''[[BR]]
Patch attached to make this possible, At present All RSS feeds are cached
for 1hour, unless MAGPIE_CACHE_AGE is set beforehand.[[BR]]
This also allows developers to disable the RSS cache by specifying a
timeout value of 0 seconds. This is not aimed at plugin developers, but
mainly towards developers working on any Administration issues which may
require constant RSS updates.
--
Ticket URL: <http://trac.wordpress.org/ticket/3950>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list