Currently the feed tag interacts directly with the Rome API to retrieve the feed or feeds required. The proposed enhancement is to introduce a proxy in front of the Rome library, in which feed caching will be managed.
The facade will maintain a cache of feeds supplied by the Rome library. A feed will only be retrieved by the Rome library if it is not already in the cache, or it is in the cache and is deemed to have expired.
If a feed is expired but cannot be refreshed from its original source, the cache should retain the expired version.
The cache will have two management properties:
1. The feed expiry interval. This is the interval after which the cached feed is replaced by a freshly retrieved copy, and controls how stale a feed can get.
2. The cache size. This is the number of feeds that can be cached simultaneously and controls the memory usage of the cache. When the cache is full, and a new feed is added, the least recently used feed should be removed.
The management properties will be made available as env-entry elements in the application web.xml, as well as having default values in the event that no env-entry elements can be found.
Consider adding expiry as a property on the rss4jsp:feed tag which over-rides the default.
There should also be a way to turn caching off - i.e. by setting the expiry interval to zero.