1 2010-05-06 Marek Habersack <mhabersack@novell.com>
3 * OutputCacheModule.cs: added a 2.0 internal property to return
4 the internal provider used in this profile.
6 * OutputCache.cs: added internal RemoveFromProvider method to
7 remove items from the indicated provider.
9 2010-02-23 Marek Habersack <mhabersack@novell.com>
11 * CachedVaryBy.cs: made serializable for 4.0+ (necessary for
12 extensible output caching)
14 2010-02-03 Marek Habersack <mhabersack@novell.com>
16 * OutputCache.cs: DefaultProviderName checks if there was any
17 provider configured and, if not, returns a built-in provider's
20 * SqlCacheDependencyAdmin.cs: added
22 * OutputCacheProviderCollection.cs: added
24 * OutputCacheProvider.cs: added
26 * OutputCacheModule.cs: uses the 4.0 extensible output cache
27 provider model now (also internally in the 2.0 profile)
28 OutputCacheProvider is retrieved on every request using
29 HttpApplication.GetOutputCacheProviderName (4.0+). In the 2.0
30 profile an instance of InMemoryOutputCacheProvider is always
33 * InMemoryOutputCacheProvider.cs: default output cache provider
34 for ASP.NET 4.0, also used internally in the 2.0 profile.
36 * CachedVaryBy.cs: made the generated key shorter
38 * CacheItemPriorityQueueDebug.cs: debugging support for
39 CacheItemPriorityQueue. Most of the code is compiled only when the
40 DEBUG macro is defined. Debugging support includes recording of
41 the queue operations sequence which is output to an XML file on
42 appdomain shutdown. The recorded sequence files can be used to
43 generate NUnit test cases for the priority queue (see
46 * CacheItemPriorityQueue.cs: rewritten using an array based heap
47 instead of a binary tree based one - implementation is simpler,
48 faster and more elegant. Heap is initially 32 entries long and
49 its size is doubled every time it fills up. After reaching a
50 threshold (8192 entries currently) it is shrunk to the number of
51 items + 1/3 of item count in order to preserve memory.
53 * CacheItem.cs: added a Guid field to easier distinguish items
54 (mostly for debugging purposes)
56 * CacheDependency.cs: minor performance improvements
58 * Cache.cs: better handling of timer periods
60 2010-01-25 Marek Habersack <mhabersack@novell.com>
62 * SqlCacheDependency.cs: added parameter checks to the
64 Partially implemented 4.0 method CreateOutputCacheDependency
66 * CacheItemUpdateReason.cs, CacheItemUpdateCallback.cs: added
68 * CacheItem.cs: added OnUpdateCallback field
70 * Cache.cs: implemented support for cache item update callback
73 * AggregateCacheDependency.cs: added undocumented
74 DependencyDispose method override
76 2010-01-22 Marek Habersack <mhabersack@novell.com>
78 * SubstitutionResponseElement.cs: implemented correct
79 (de)serialization of the Callback delegate.
81 * OutputCache.cs: implemented Serialize, Deserialize,
82 DefaultProviderName and Providers.
84 2010-01-21 Marek Habersack <mhabersack@novell.com>
86 * DatabaseNotEnabledForNotificationException.cs, OutputCache.cs,
87 FileResponseElement.cs, HeaderElement.cs, IOutputCacheEntry.cs,
88 MemoryResponseElement.cs, OutputCacheProvider.cs,
89 ResponseElement.cs, OutputCacheProviderCollection.cs,
90 SubstitutionResponseElement.cs,
91 TableNotEnabledForNotificationException.cs: added
93 * CacheDependency.cs: default constructor is protected in 4.0
95 2010-01-06 Marek Habersack <mhabersack@novell.com>
97 * CacheItemPriorityQueue.cs: make sure lastParent is never null if
98 root is not null in Enqueue. Possible fix for bug #567869
100 2009-12-01 Marek Habersack <mhabersack@novell.com>
102 * Cache.cs: ExpireItems dequeues the next item when a disabled
103 item is found before continuing to look for items to expire. Fixes
104 bug #559470. Patch from Adriaan van Kekem <avkekem@hotmail.com>,
107 2009-10-21 Marek Habersack <mhabersack@novell.com>
109 * CacheItemPriorityQueue.cs: lock the queue on enqueue/dequeue
111 2009-10-20 Marek Habersack <mhabersack@novell.com>
113 * OutputCacheModule.cs: keysCache and entriesToInvalidate
114 dictionaries are allocated only when they are
115 required. BuildManager's RemoveEntry envent is subscribed to only
116 if cache actually has some entries.
117 Added support for post-cache substitution.
119 * CachedRawResponse.cs: data is stored in a list of DataItem
120 instances instead of just in a single buffer. This enables support
121 for post-cache substitution.
123 2009-10-05 Marek Habersack <mhabersack@novell.com>
125 * Cache.cs: if item expiration time exceeds the maximum value
126 Timer accepts, use the latter - item will expire properly anyway,
127 as the timer will be rescheduled for the item's expiration time
128 once that item is bubbled to the top of the priority queue. Fixes
131 2009-09-26 Marek Habersack <mhabersack@novell.com>
133 * CacheItemPriorityQueue.cs, CacheItem.cs, CacheItemEnumerator.cs:
136 * Cache.cs: factored out CacheItem and CacheItemEnumerator to
138 Use reader-writer locks instead of Monitor.
139 Added two 3.5sp1 properties - EffectivePrivateBytesLimit and
140 EffectivePercentagePhysicalMemoryLimit.
141 Added support for disabling cache item expiration.
142 One timer is used to expire all timed items (instead of one timer
143 per item). Timed items are kept in a priority queue.
145 2009-03-03 Marek Habersack <mhabersack@novell.com>
147 * CachedRawResponse.cs: headers are stored in NameValueCollection
150 2009-01-09 Marek Habersack <mhabersack@novell.com>
152 * Cache.cs: System.Threading.Timer.Change takes a long, not an
153 int. The maximum value of sliding expiration is 365 days
154 (31536000000ms) which fits within the value range of long. The
155 previous cast to int might yield negative values in certain
156 situations which was the reason for bug #464221. Fixes bug #464221
158 2008-10-21 Marek Habersack <mhabersack@novell.com>
160 * OutputCacheModule.cs: seal the class.
161 Made OnRawResponseRemoved a static method.
163 * CachedVaryBy.cs: seal the class.
164 Use portable line terminators instead of literal '\n'.
166 * Cache.cs: seal the CacheItem and CacheItemEnumerator classes.
168 * CacheDependency.cs: dispose the associated dependency in the
169 DependencyDispose method.
171 * CachedRawResponse.cs: seal the class
173 2008-10-15 Marek Habersack <mhabersack@novell.com>
175 * OutputCacheModule.cs: do not take any action if Response returns
176 null from GetCachedResponse.
178 2008-09-30 Juraj Skripsky <js@hotfeet.ch>
180 * CachedRawResponse.cs: Don't allocate a 32k buffer that is never
181 used. Fixes enhancement bug #430963.
183 2008-09-29 Marek Habersack <mhabersack@novell.com>
185 * OutputCacheModule.cs: invalidate cache entries when the
186 corresponding source file (.as?x) is recompiled by hooking up to
187 System.Web.Compilation.BuildManager's build cache entry removal
188 event. Fixes bug #429926
190 2008-09-26 Juraj Skripsky <js@hotfeet.ch>
192 * OutputCacheModule.cs: Consistently use InternalCache for
193 CachedRawResponse items and Cache for CachedVaryBy items.
194 Partial fix for bug #429926.
196 2008-08-11 Marek Habersack <mhabersack@novell.com>
198 * Cache.cs: dispose item timer when removing an entry. Fixes bug
199 #416076. Patch provided by Adriaan van Kekem
200 <adriaanvk@gmail.com>, thanks!
201 Pass onRemoveCallback along in Insert. Fixes bugs #324528 and
202 #382644. Patch provided by Juraj Skripsky <juraj@hotfeet.ch>,
205 2008-06-18 Marek Habersack <mhabersack@novell.com>
207 * SqlCacheDependency.cs: added
209 2008-05-30 Marek Habersack <mhabersack@novell.com>
211 * CacheDependency.cs: do not use synthetized event accessors (to
214 2008-05-23 Marek Habersack <mhabersack@novell.com>
216 * Cache.cs: optimize lock usage
218 2008-04-28 Marek Habersack <mhabersack@novell.com>
220 * Cache.cs: refactoring - move the timeout setting code to
221 separate methods, so that it can be accessed from outside the
222 class. Fixes bug #382644
224 2008-03-18 Geoff Norton <gnorton@novell.com>
226 * Cache.cs: MS allows calling Insert in a removed handler, we need to
227 avoid double locking here otherwise the Insert will never succeed.
229 2008-02-26 Kornél Pál <kornelpal@gmail.com>
231 * CachedRawResponse.cs, OutputCacheModule.cs: Don't add Date header because
232 servers usually add a Date header that would result in duplicate Date header
233 sent to the client. Fixes bug #363404.
235 2007-12-31 Vladimir Krasnov <vladimirk@maimsoft.com>
237 * Cache.cs: added DependencyCache property, a cache object for
238 creating dependencies
240 2007-12-19 Juraj Skripsky <js@hotfeet.ch>
242 * Cache.cs: Replace periodic timer (60s) with per-cache-item expiration
245 2007-08-17 Marek Habersack <mhabersack@novell.com>
247 * CacheDependency.cs: use DependencyChanged as a list of events.
248 OnChanged now calls OnDependencyChanged, to notify
249 AggregateCacheDependency that it has changed. Fixes bug #82419.
251 2007-08-14 Marek Habersack <mhabersack@novell.com>
253 * AggregateCacheDependency.cs: propagate changes in any child
254 dependencies to the base class.
256 2007-06-25 Juraj Skripsky <js@hotfeet.ch>
258 * Cache.cs: Re-introduce "InvokePrivateCallbacks" accidentally
261 2007-06-20 Marek Habersack <mhabersack@novell.com>
263 * OutputCacheModule.cs: use Context.InternalCache.
265 * Cache.cs: 2.0 profile uses generic containers to keep the cache
267 Gotten rid of the InsertPrivate and InsertInternal methods. The
268 latter was moved to one of the Insert overloads.
269 Private entries are no longer handled specifically, because the
270 internal cache is now kept in a separate object.
271 Iterate over the entries when filling the ArrayList in the 2.0
272 profile to avoid type cast exceptions.
274 2007-05-03 Igor Zelmanovich <igorz@mainsoft.com>
276 * AggregateCacheDependency.cs:
277 * CacheDependency.cs:
280 2007-04-10 Marek Habersack <mhabersack@novell.com>
282 * CacheDependency.cs: add the NotifyFilters.Size to the
283 watcher flags, so that we watch for modifications to a file when
286 2006-11-29 Marek Habersack <grendello@gmail.com>
288 * CachedVaryBy.cs: Make sure that the vary:* header is generated
289 only when allowed under the 2.0 profile.
291 2006-11-25 Marek Habersack <grendello@gmail.com>
293 * AggregateCacheDependency.cs: A small code optimization.
295 2006-11-14 Marek Habersack <grendel@caudium.net>
298 * CacheDependency.cs:
299 * AggregateCacheDependency.cs: implement this one.
301 2006-09-11 Andrew Skiba <andrews@mainsoft.com>
303 * CacheDependency.cs: ifdef TARGET_JVM
305 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
307 * CacheDependency.cs:
308 * Cache.cs: check dependencies on other cache keys. Fixes bug #79002.
310 2006-03-18 Robert Jordan <robertj@gmx.net>
312 * OutputCacheModule.cs: invoke the validation callbacks of
313 HttpCachePolicy. Fixes bug #77825.
315 2006-03-14 Robert Jordan <robertj@gmx.net>
317 * CachedVaryBy.cs: Fixed VaryByParam="*". Replaced request.Param
318 with QueryString and Form lookups. Made the param name output case
319 insensitive. Fixes bug #77757.
321 2005-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
323 * Cache.cs: new internal method.
325 2005-09-08 Eyal Alaluf <eyala@mainsoft.com>
326 * OutputCacheModule.cs: Use C# 1.0 style of delegate instantiating.
327 Needed to compile Grasshopper (TARGET_J2EE) which uses MS C# 1.0
328 compiler and does not use msc.
330 2005-09-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
332 * Cache.cs: ignore exceptions thrown by removed item callbacks.
334 2005-09-02 Sebastien Pouliot <sebastien@ximian.com>
336 * Cache.cs: Added security permissions with Minimal level for
337 AspNetHostingPermissionLevel (only LinkDemand as the class is sealed).
338 * CacheDependency.cs: : Added security permissions with Minimal level
339 for AspNetHostingPermissionLevel (note class is sealed only in 1.x).
341 2005-09-01 Eyal Alaluf <eyala@mainsoft.com>
342 * CacheDependency.cs: TARGET_J2EE fixes.
344 2005-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
346 * CacheDependency.cs: add missing ctor.
348 2005-08-15 Jackson Harper <jackson@ximian.com>
350 * CacheItemPriority.cs:
351 * CacheItemRemovedCallback.cs:
352 * CacheItemRemovedReason.cs: New implementations.
354 2005-07-30 Miguel de Icaza <miguel@novell.com>
356 * OutputCacheModule.cs: Make synchronous.
358 2005-07-15 Lluis Sanchez Gual <lluis@novell.com>
360 * Cache.cs: New implementation.
361 * CacheDependency.cs: New implementation.
363 2005-06-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
365 * Cache.cs: added new InsertPrivate overload.
367 2005-06-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
370 * CacheEntry.cs: style. Removed doc. comments.
372 2005-06-08 Ilya Kharmatsky <ilyak-at-mainsoft.com>
374 * CacheDependency.cs - added TARGET_JVM directives in places,
375 where file watching is using (Mainsoft's implementation currently
376 doesn't support the feature).
378 2005-05-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
380 * CacheEntry.cs: credits for this patch should go to mcs. it catched
381 that the code after 'if ((_enumFlags & Flags.Removed) != 0)' was
384 2005-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
388 * CacheExpires.cs: fix NullReferenceException thrown sometimes when
389 using sliding expiration and under high load. Patch by Eyal Alayuf from
392 2005-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
394 * CacheDependency.cs: remove warnings.
396 2005-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
398 * CachedVaryBy.cs: fixed VaryByParam and wildcard (*). Patch by Ilya
399 Kharmatsky (Mainsoft) that fixes bug #73981.
401 2005-04-01 Lluis Sanchez Gual <lluis@novell.com>
403 * CachedRawResponse.cs: Fix warning.
405 2004-11-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
407 * CacheEntry.cs: convert the external DateTime to GMT, as everything
408 else uses that timezone. Fixes bug #69194.
410 2004-10-03 Ben Maurer <bmaurer@ximian.com>
412 * Cache.cs, CacheEntry.cs, CacheExpires.cs, ExpiresBuckets.cs:
413 use UtcNow rather than Now.
415 2004-05-27 Patrik Torstensson <totte@hiddenpeaks.com>
417 * ExpiresBucket.cs (FlushExpiredItems): fix csc and a typo bug
419 2004-05-27 Patrik Torstensson <totte@hiddenpeaks.com>
421 * CacheEntry.cs,CacheExpires.cs,ExpiresBucket.cs,
422 Cache.cs : Fixed deadlock issues, fixed
423 items not correctly being flushed, fixed update
424 of item when expiration has been updated more
425 than 1 min (placed in wrong bucket),
426 fixed deadlock during cache callback when item
427 is removed due to expiriation.
429 Rewrite of locking handling in Cache class, leading
430 to better performance and less bugs.
432 This rewrite is due to a number of bugs found
433 in the output caching during load (leading to memory
436 2004-05-16 Patrik Torstensson <totte@hiddenpeaks.com>
438 * ExpiresBucket.cs: Style changes plus;
439 (Update): Fixed possible lock bug (bug 54531)
440 (Expand): remove lock optimization due to it can cause newly
441 added items to be lost.
442 (Remove): fixed possible lock bug.
444 2004-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
446 * Cache.cs: fix from Jan Jaros for NullRef (bug #56996).
448 2004-04-07 Lluis Sanchez Gual <lluis@ximian.com>
450 * Cache.cs, CacheEntry.cs, ExpiresBuckets.cs: The value to use to
451 specify infinite timeout in ReaderWriterLock is -1, not 0.
453 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
455 * Watcher.cs: Removed file. Jackson made it obsolete and already
456 removed it from the .sources file.
458 2004-02-09 Jackson Harper <jackson@ximian.com>
460 * ExpiresBucket.cs: Remove duplicate code. Fixes bug #54031.
462 2004-02-09 Jackson Harper <jackson@ximian.com>
464 * Cache.cs: Close entries that are removed.
465 * CacheDependency.cs: Use FileSystemWatcher instead of custom
466 Watcher for file dependencies.
467 * OutputCacheModule.cs: Make the varyby objects dependent on the
470 2004-02-05 Jackson Harper <jackson@ximian.com>
472 * CacheDependency.cs: Handle cache keys that have not been added
475 2004-02-02 Jackson Harper <jackson@ximian.com>
477 * OutputCacheModule.cs: We can use file dependancies now.
479 2004-01-14 Jackson Harper <jackson@ximian.com>
481 * Cache.cs: Return null when items are expired but have not been
483 * OutputCacheModule.cs: Handle sliding expirations. Remove hacks
484 checking if the item is expired, the cache no longer returns
487 2004-01-14 Jackson Harper <jackson@ximian.com>
489 * Cache.cs: When using sliding expiration update the cache objects
490 expires time as well as the expires entry expire time because the
491 objects expire time is checked when objects are pulled out. This
494 2004-01-11 Jackson Harper <jackson@ximian.com>
496 * OutputCacheModule.cs: Remove varyby objects when there are no
497 more raw responses that belong to them.
498 * CachedRawResponse.cs: Keep a reference to the VaryBy object that
499 this response belongs to this is so the varyby can be cleaned up.
500 * CachedVaryBy.cs: Keep a reference to the keys that belong to the
501 varyby and a reference to the varyby's key.
503 2004-01-04 Jackson Harper <jackson@ximian.com>
505 * OutputCacheModule.cs: Dont cache items when trace is enabled.
507 2004-01-04 Jackson Harper <jackson@ximian.com>
509 * OutputCacheModule.cs: Update the date header value.
510 * CachedRawResponse.cs: Expose a ref to the date header, so it can
511 be easily set/updated. Remove unused methods and vars.
513 2004-01-04 Jackson Harper <jackson@ximian.com>
515 * CacheDependency.cs: Copy all the entries into the entries array,
516 set on removed callback for items that we are dependent on.
517 * Cache.cs: Add method to get CacheEntry objects.
518 * OutputCacheModule.cs: Make raw repsonse entries dependent on
519 their varyby param entries.
521 2004-01-04 Jackson Harper <jackson@ximian.com>
523 * OutputCacheModule.cs: VaryBy keys now need the HttpContext not just the request.
524 * CachedVaryBy.cs: Handle vary by headers, and vary by custom.
526 2004-01-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
528 * ExpiresBuckets.cs: set _intPos when expanding the array. Fixes bug
529 52541. Patch by Jan Jaros (mono-bug@jerryweb.info).
531 2003-11-21 Jackson Harper <jackson@ximian.com>
533 * OutputCacheModule.cs: Only cache a page if it has a 200 status
535 * CachedVaryBy.cs: Give raw response keys a name, use the
536 httpmethod in the key, and delimit items with \n so it is easier
537 to read when debugging.
539 2003-11-21 Jackson Harper <jackson@ximian.com>
541 * OutputCacheModule.cs: Store a CachedVaryBy object for each
542 cached page. Then store a CachedRawResponse for each combination
543 of varried parameters for a page.
544 * CachedRawResponse.cs: Do not need to store param values anymore
545 those are stored in the CachedVaryBy now. Get the content length
546 so we dont send back the entire buffer.
547 * CachedVaryBy.cs: New file - holds the varyby data for a page,
548 and a method to generate a key based on params. Right now this
549 only works with VaryByParams. TODO: support VaryByHeaders and
552 2003-11-20 Jackson Harper <jackson@ximian.com>
554 * Cache.cs: New method so non public cache items can be added.
555 * CachedRawResponse.cs: New file - A snapshot of a response that
556 is stored in the cache and can be used to create a new response.
557 * OutputCacheModule.cs: Module for inserting and retrieving
558 responses from the cache.
560 2003-04-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
562 * CacheDependency.cs:
564 * Watcher.cs: added a FileSystemWatcher-like class for dependency checking.
566 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
569 * CacheDefinitions.cs:
570 * CacheDependency.cs:
573 * ExpiresBuckets.cs: reformatted, make class status page happier. Does
574 not work yet (wait for the next patch).
576 2002-12-27 Daniel Cazzulino <dcazzulino@users.sf.net>
578 * CacheEntry.cs: several changes. New constants, use of constants
579 defined in Cache.cs, modified locks to optimize perf. Fixed property
580 sets which weren't using the keyword value to set the new values
581 (don't know how this worked before!).
583 * Cache.cs: changed singleton implementation to only create the object
584 when actually used. Changed Insert overloads to use constants
585 defined instead of hard values.
587 * ExpiresBuchets: major changes. All locking now uses ReaderWriterLock
588 class. Bucket now efectively reuses free indexes from removed items
589 to avoid unnecessary expansions. Expansion now uses Array.CopyTo to
590 add elements to the new list. Added private Int32Collection to
591 handle int indexes efficiently (thanks Shawn Van Ness). See comments
594 2002-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
596 * Cache.cs: little fixes.
598 2002-07-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
600 * CacheDefinitions.cs: fixed a couple of enums.
602 * CacheDependency.cs: the class is sealed.
604 2002-06-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
606 * CacheDependency.cs: fixed a couple of typos and don't throw
607 NotImplementedException in constructors.
609 2001-12-21 Gaurav Vaish <gvaish@iitk.ac.in>
611 * CacheDependency.cs: Some unimplemented methods to make build
613 2001-07-20 Patrik Torstensson (Patrik.Torstensson@labs2.com)
615 * Cache.cs: Implemented. (90% ready)
616 * CacheDefinitions.cs: Implemented.
617 * CacheDependency.cs: Added. (20% ready)
618 * CacheExpires: Implemented.
619 * CacheEntry.cs: Implemented. (95% ready, going to be changed due to CacheDependecy support)
620 * ExpiresBuckets.cs: Implemented.