[Mono-bugs] [Bug 429926] [Patch] OutputCache doesn't work

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Sep 25 10:48:34 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=429926

User juraj at hotfeet.ch added comment
https://bugzilla.novell.com/show_bug.cgi?id=429926#c1





--- Comment #1 from Juraj Skripsky <juraj at hotfeet.ch>  2008-09-25 08:48:33 MDT ---
Created an attachment (id=241714)
 --> (https://bugzilla.novell.com/attachment.cgi?id=241714)
patch

The problem is that OutputCacheModule sometimes put items in
context.InternalCache and tries to fetch them from context.Cache. The attached
patch fixes this.

I first tried using InternalCache for all items (which I think is the right
thing to do), but that doesn't work because of these lines in HttpRuntime.cs:

   cache = new Cache ();
   internalCache = new Cache ();
   internalCache.DependencyCache = cache;

The CachedRawResponse cache items have a CacheDependency linked to the
CachedVaryBy items. This dependency is checked via HasChanged. The HasChanged
getter contains this line:

   if (cache.GetKeyLastChange (key) > start)

As the key is not found (cache points to HttpRuntime.Cache not InternalCache),
GetKeyLastChange always return DateTime.MaxValue and hence HasChanged returns
true.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list