private static SyndicationFeedFormatter SetCache(Arguments arguments, SyndicationFeedFormatter formattedFeed) { MemoryCache.Default.Add( new CacheItem(arguments.ToString(), formattedFeed), new CacheItemPolicy { AbsoluteExpiration = DateTimeOffset.Now.AddMinutes(1) }); return(formattedFeed); }
private static SyndicationFeedFormatter GetFromCache(Arguments arguments) => MemoryCache.Default.Get(arguments.ToString()) as SyndicationFeedFormatter;