public static ICacheExpiration[] GetCacheExpirations(CacheItem item) { lastTimeAccessed = item.LastAccessedTime; var expirations = new List<ICacheExpiration>(); switch (item.GetCacheItemType()) { case CacheItemType.Object: expirations.AddRange(GetTimeExpirations(true, true)); break; case CacheItemType.Page: expirations.AddRange(GetTimeExpirations(true, true)); break; case CacheItemType.Collection: expirations.AddRange(GetTimeExpirations(true, true)); break; } return expirations.ToArray(); }