enhance fetch_rss to optionally have a variable cache timeout
|Reported by:||DD32||Owned by:||anonymous|
Issue: Plugin developers want to check a RSS feed only once per day.
Current Solution: Define MAGPIE_CACHE_AGE to the timeout value before retrieving RSS feed.
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.
More Elegant solution: Allow fetch_rss() to accept a cache timeout: fetch_rss($rssFeedUrl,24*60*60)
Patch attached to make this possible, At present All RSS feeds are cached for 1hour, unless MAGPIE_CACHE_AGE is set beforehand.
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.
Change History (9)
- Cc dd32 removed
- Resolution set to wontfix
- Status changed from new to closed