public static IEnumerable<PpvEventDto> GetAvailablePPVEventsByHeadend(string headendCode) { var dynamicCacheKey = string.Format(PROVISIONING_AVAILABLE_PPV_BY_HEADEND, headendCode); if (cache[dynamicCacheKey] != null) { return cache[dynamicCacheKey] as IEnumerable<PpvEventDto>; } try { using (var client = new RosettianClient()) { AddToCache ( dynamicCacheKey, client.GetPPVEventsByHeadend(headendCode, UserDto.SIMPLSystemUser), AVAILABLE_PPV_EXPIRATION_TIME ); } } catch { AddToCache(dynamicCacheKey, new List<PpvEventDto>(), 1); } return cache[dynamicCacheKey] as IEnumerable<PpvEventDto>; }