private static ShoutCollection GetLatestShouts(int hostID, int?toUserID, int?chatID, int pageIndex, int pageSize) { string cacheKey = GetCacheKey(hostID, toUserID, chatID, pageIndex, pageSize); CacheManager <string, ShoutCollection> cache = GetShoutCache(); ShoutCollection shouts = cache[cacheKey]; if (shouts == null) { shouts = Shout.GetPage(hostID, toUserID, chatID, pageIndex, pageSize); cache.Insert(cacheKey, shouts, CacheHelper.CACHE_DURATION_IN_SECONDS); } return(shouts); }