IList<TwitterStatus> GetProfile()
{
var cacheKey = String.Format("__TwitterProfile_{0}_{1}_{2}_{3}", ScreenName, Count, IncludeRetweets, IncludeReplies);
var results = (IList<TwitterStatus>)Context.Cache[cacheKey];
if (results == null) {
var api = new TwitterAPI();
try {
results = api.GetProfile(ScreenName, Count, IncludeRetweets, IncludeReplies);
} catch {
return null;
}
Context.Cache.Insert(cacheKey, results, null, DateTime.UtcNow.AddSeconds(CacheDuration), Cache.NoSlidingExpiration);
}
return results;
}