[Mono-bugs] [Bug 82419][Wis] New - AggregateCacheDependency doesn't work as expected

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun Aug 12 12:19:00 EDT 2007


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by joe_audette at yahoo.com.

http://bugzilla.ximian.com/show_bug.cgi?id=82419

--- shadow/82419	2007-08-12 12:19:00.000000000 -0400
+++ shadow/82419.tmp.1679	2007-08-12 12:19:00.000000000 -0400
@@ -0,0 +1,88 @@
+Bug#: 82419
+Product: Mono: Class Libraries
+Version: 1.2
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: Sys.Web
+AssignedTo: mhabersack at novell.com                            
+ReportedBy: joe_audette at yahoo.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: AggregateCacheDependency doesn't work as expected
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+Using an AggregateCacheDependency which contains a single CacheDependency
+does not clear the cache when touching the file that the inner dependency
+is supposed to be watching
+
+
+Steps to reproduce the problem:
+Commented code doesn't work on Mono but does on Windows. It raises no
+errors on Mono but touching the file of the inner dependency does not clear
+the cache
+//AggregateCacheDependency aggregateCacheDependency = new
+AggregateCacheDependency();
+                //aggregateCacheDependency.Add(new
+CacheDependency(pathToCacheDependencyFile));
+                //// more dependencies can be added if needed
+
+                //DateTime absoluteExpiration =
+DateTime.Now.AddSeconds(moduleConfiguration.CacheTime);
+                //TimeSpan slidingExpiration = TimeSpan.Zero;
+                //CacheItemPriority priority = CacheItemPriority.Default;
+                //CacheItemRemovedCallback callback = null;
+
+                //HttpRuntime.Cache.Insert(
+                //    CacheKey,
+                //    cachedOutput,
+                //    aggregateCacheDependency,
+                //    absoluteExpiration,
+                //    slidingExpiration,
+                //    priority,
+                //    callback);
+
+                // Mono doesn't like aggregate dependencies
+                // and we don't need it here so just use regular cahce
+dependency.
+
+                CacheDependency cacheDependency = new
+CacheDependency(pathToCacheDependencyFile);
+                
+                DateTime absoluteExpiration =
+DateTime.Now.AddSeconds(moduleConfiguration.CacheTime);
+                TimeSpan slidingExpiration = TimeSpan.Zero;
+                CacheItemPriority priority = CacheItemPriority.Default;
+                CacheItemRemovedCallback callback = null;
+
+                HttpRuntime.Cache.Insert(
+                    CacheKey,
+                    cachedOutput,
+                    cacheDependency,
+                    absoluteExpiration,
+                    slidingExpiration,
+                    priority,
+                    callback);
+
+Actual Results:
+Cache is not cleared by touching the file of the inner dependency
+
+Expected Results:
+Cache is cleared if any inner dependency file is touched
+
+
+How often does this happen? 
+Every time
+
+Additional Information:
+Sorry, I should have reported this long ago but was able to work around it
+by commenting out the original code and using the code as shown above. So
+this issue is not currently affecting me I just got side tracked and forgot
+to report it.


More information about the mono-bugs mailing list