Explorar el Código

2009-12-01 Marek Habersack <[email protected]>

	* Cache.cs: ExpireItems dequeues the next item when a disabled
	item is found before continuing to look for items to expire. Fixes
	bug #559470. Patch from Adriaan van Kekem <[email protected]>,
	thanks.

svn path=/trunk/mcs/; revision=147213
Marek Habersack hace 16 años
padre
commit
90fd2a073c

+ 3 - 1
mcs/class/System.Web/System.Web.Caching/Cache.cs

@@ -471,8 +471,10 @@ namespace System.Web.Caching
 			while (item != null) {
 				if (!item.Disabled && item.ExpiresAt > now.Ticks)
 					break;
-				if (item.Disabled)
+				if (item.Disabled) {
+					item = timedItems.Dequeue ();
 					continue;
+				}
 				
 				item = timedItems.Dequeue ();
 				Remove (item.Key, CacheItemRemovedReason.Expired, true);

+ 7 - 0
mcs/class/System.Web/System.Web.Caching/ChangeLog

@@ -1,3 +1,10 @@
+2009-12-01  Marek Habersack  <[email protected]>
+
+	* Cache.cs: ExpireItems dequeues the next item when a disabled
+	item is found before continuing to look for items to expire. Fixes
+	bug #559470. Patch from Adriaan van Kekem <[email protected]>,
+	thanks.
+
 2009-10-21  Marek Habersack  <[email protected]>
 
 	* CacheItemPriorityQueue.cs: lock the queue on enqueue/dequeue