Caching A SyndicationFeed

Topics: Caching Application Block , Data Access Application Block
Jun 8, 2009 at 5:17 PM

I need to cache a syndication feed (System.ServiceModel.Syndication.SyndicationFeed) and was hoping to use the Enterprise Library 4.1 Caching Application Block with a SQL Server 2005 backing store.  The only problem is that the SyndicationFeed class is not serializable.  I played around with the Rss20FeedFormatter, but I am new to creating and consuming RSS feeds and wasn't able to get it working correctly.  Any advice or best practices regarding caching syndicated feeds would be greatly appreciated.  Thank you.

Jun 9, 2009 at 5:56 AM

The only way I can think of right now is to create a wrapper class(marked as Serializable) that serializes your SyndicationFeed using either Atom10FeedFormatter or RSS20FeedFormatter.  This wrapper class would also contain that will return the actual SyndicationFeed from the feedFormatter you used. 


Sarah Urmeneta
Global Technology & Solutions
Avande, Inc.