From ea3d9260959dc098a1b0a0579a0a432a0be07f98 Mon Sep 17 00:00:00 2001 From: Daniel Stolt Date: Tue, 27 Aug 2013 04:14:22 +0200 Subject: [PATCH] Changed AzureOutputCacheStorageProvider to return empty list when asked to enumerate cache contents (instead of throwing NotImplementedException as before). --- .../Caching/Output/AzureOutputCacheStorageProvider.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Orchard.Web/Modules/Orchard.Azure/Services/Caching/Output/AzureOutputCacheStorageProvider.cs b/src/Orchard.Web/Modules/Orchard.Azure/Services/Caching/Output/AzureOutputCacheStorageProvider.cs index 27627827b..0cd4e5874 100644 --- a/src/Orchard.Web/Modules/Orchard.Azure/Services/Caching/Output/AzureOutputCacheStorageProvider.cs +++ b/src/Orchard.Web/Modules/Orchard.Azure/Services/Caching/Output/AzureOutputCacheStorageProvider.cs @@ -89,7 +89,7 @@ namespace Orchard.Azure.Services.Caching.Output { public IEnumerable GetCacheItems(int skip, int count) { if (_usingSharedCaching) - throw new NotSupportedException("The GetCacheItems() method is not supported with Windows Azure Shared Caching."); + return Enumerable.Empty(); // Enumeration not supported with Shared Caching. return _cache.GetObjectsInRegion(_region).AsParallel() .Select(x => x.Value) @@ -101,7 +101,7 @@ namespace Orchard.Azure.Services.Caching.Output { public int GetCacheItemsCount() { if (_usingSharedCaching) - throw new NotSupportedException("The GetCacheItemsCount() method is not supported with Windows Azure Shared Caching."); + return 0; // Enumeration not supported with Shared Caching. return _cache.GetObjectsInRegion(_region).AsParallel() .Select(x => x.Value)