2010-03-02 Jb Evain <jbevain@novell.com>
[mcs.git] / class / System.Web / System.Web.Caching / ChangeLog
blob9de482e55bffb4c8de80c94e113744562f4f6342
1 2010-02-23  Marek Habersack  <mhabersack@novell.com>
3         * CachedVaryBy.cs: made serializable for 4.0+ (necessary for
4         extensible output caching)
6 2010-02-03  Marek Habersack  <mhabersack@novell.com>
8         * OutputCache.cs: DefaultProviderName checks if there was any
9         provider configured and, if not, returns a built-in provider's
10         name.
12         * SqlCacheDependencyAdmin.cs: added
14         * OutputCacheProviderCollection.cs: added
16         * OutputCacheProvider.cs: added
18         * OutputCacheModule.cs: uses the 4.0 extensible output cache
19         provider model now (also internally in the 2.0 profile)
20         OutputCacheProvider is retrieved on every request using
21         HttpApplication.GetOutputCacheProviderName (4.0+). In the 2.0
22         profile an instance of InMemoryOutputCacheProvider is always
23         returned.
25         * InMemoryOutputCacheProvider.cs: default output cache provider
26         for ASP.NET 4.0, also used internally in the  2.0 profile.
28         * CachedVaryBy.cs: made the generated key shorter
30         * CacheItemPriorityQueueDebug.cs: debugging support for
31         CacheItemPriorityQueue. Most of the code is compiled only when the
32         DEBUG macro is defined. Debugging support includes recording of
33         the queue operations sequence which is output to an XML file on
34         appdomain shutdown. The recorded sequence files can be used to
35         generate NUnit test cases for the priority queue (see
36         ../Test/tools/README)
38         * CacheItemPriorityQueue.cs: rewritten using an array based heap
39         instead of a binary tree based one - implementation is simpler,
40         faster and more elegant. Heap is initially 32 entries long and
41         its size is doubled every time it fills up. After reaching a
42         threshold (8192 entries currently) it is shrunk to the number of
43         items + 1/3 of item count in order to preserve memory.
45         * CacheItem.cs: added a Guid field to easier distinguish items
46         (mostly for debugging purposes)
48         * CacheDependency.cs: minor performance improvements
50         * Cache.cs: better handling of timer periods
52 2010-01-25  Marek Habersack  <mhabersack@novell.com>
54         * SqlCacheDependency.cs: added parameter checks to the
55         constructors.
56         Partially implemented 4.0 method CreateOutputCacheDependency
58         * CacheItemUpdateReason.cs, CacheItemUpdateCallback.cs: added
60         * CacheItem.cs: added OnUpdateCallback field
62         * Cache.cs: implemented support for cache item update callback
63         (3.5+)
65         * AggregateCacheDependency.cs: added undocumented
66         DependencyDispose method override
68 2010-01-22  Marek Habersack  <mhabersack@novell.com>
70         * SubstitutionResponseElement.cs: implemented correct
71         (de)serialization of the Callback delegate.
73         * OutputCache.cs: implemented Serialize, Deserialize,
74         DefaultProviderName and Providers.
76 2010-01-21  Marek Habersack  <mhabersack@novell.com>
78         * DatabaseNotEnabledForNotificationException.cs, OutputCache.cs,
79         FileResponseElement.cs, HeaderElement.cs, IOutputCacheEntry.cs,
80         MemoryResponseElement.cs, OutputCacheProvider.cs,
81         ResponseElement.cs, OutputCacheProviderCollection.cs,
82         SubstitutionResponseElement.cs,
83         TableNotEnabledForNotificationException.cs: added
85         * CacheDependency.cs: default constructor is protected in 4.0
87 2010-01-06  Marek Habersack  <mhabersack@novell.com>
89         * CacheItemPriorityQueue.cs: make sure lastParent is never null if
90         root is not null in Enqueue. Possible fix for bug #567869
92 2009-12-01  Marek Habersack  <mhabersack@novell.com>
94         * Cache.cs: ExpireItems dequeues the next item when a disabled
95         item is found before continuing to look for items to expire. Fixes
96         bug #559470. Patch from Adriaan van Kekem <avkekem@hotmail.com>,
97         thanks.
99 2009-10-21  Marek Habersack  <mhabersack@novell.com>
101         * CacheItemPriorityQueue.cs: lock the queue on enqueue/dequeue
103 2009-10-20  Marek Habersack  <mhabersack@novell.com>
105         * OutputCacheModule.cs: keysCache and entriesToInvalidate
106         dictionaries are allocated only when they are
107         required. BuildManager's RemoveEntry envent is subscribed to only
108         if cache actually has some entries.
109         Added support for post-cache substitution.
111         * CachedRawResponse.cs: data is stored in a list of DataItem
112         instances instead of just in a single buffer. This enables support
113         for post-cache substitution.
115 2009-10-05  Marek Habersack  <mhabersack@novell.com>
117         * Cache.cs: if item expiration time exceeds the maximum value
118         Timer accepts, use the latter - item will expire properly anyway,
119         as the timer will be rescheduled for the item's expiration time
120         once that item is bubbled to the top of the priority queue. Fixes
121         bug #544171
123 2009-09-26  Marek Habersack  <mhabersack@novell.com>
125         * CacheItemPriorityQueue.cs, CacheItem.cs, CacheItemEnumerator.cs:
126         added
128         * Cache.cs: factored out CacheItem and CacheItemEnumerator to
129         separate files.
130         Use reader-writer locks instead of Monitor.
131         Added two 3.5sp1 properties - EffectivePrivateBytesLimit and
132         EffectivePercentagePhysicalMemoryLimit.
133         Added support for disabling cache item expiration.
134         One timer is used to expire all timed items (instead of one timer
135         per item). Timed items are kept in a priority queue.
137 2009-03-03  Marek Habersack  <mhabersack@novell.com>
139         * CachedRawResponse.cs: headers are stored in NameValueCollection
140         now.
142 2009-01-09  Marek Habersack  <mhabersack@novell.com>
144         * Cache.cs: System.Threading.Timer.Change takes a long, not an
145         int. The maximum value of sliding expiration is 365 days
146         (31536000000ms) which fits within the value range of long. The
147         previous cast to int might yield negative values in certain
148         situations which was the reason for bug #464221. Fixes bug #464221
150 2008-10-21  Marek Habersack  <mhabersack@novell.com>
152         * OutputCacheModule.cs: seal the class.
153         Made OnRawResponseRemoved a static method.
155         * CachedVaryBy.cs: seal the class.
156         Use portable line terminators instead of literal '\n'.
158         * Cache.cs: seal the CacheItem and CacheItemEnumerator classes.
160         * CacheDependency.cs: dispose the associated dependency in the
161         DependencyDispose method.
163         * CachedRawResponse.cs: seal the class
165 2008-10-15  Marek Habersack  <mhabersack@novell.com>
167         * OutputCacheModule.cs: do not take any action if Response returns
168         null from GetCachedResponse.
170 2008-09-30  Juraj Skripsky  <js@hotfeet.ch>
172         * CachedRawResponse.cs: Don't allocate a 32k buffer that is never 
173         used. Fixes enhancement bug #430963.
175 2008-09-29  Marek Habersack  <mhabersack@novell.com>
177         * OutputCacheModule.cs: invalidate cache entries when the
178         corresponding source file (.as?x) is recompiled by hooking up to
179         System.Web.Compilation.BuildManager's build cache entry removal
180         event. Fixes bug #429926
182 2008-09-26  Juraj Skripsky  <js@hotfeet.ch>
184         * OutputCacheModule.cs: Consistently use InternalCache for
185         CachedRawResponse items and Cache for CachedVaryBy items.
186         Partial fix for bug #429926.   
188 2008-08-11  Marek Habersack  <mhabersack@novell.com>
190         * Cache.cs: dispose item timer when removing an entry. Fixes bug
191         #416076. Patch provided by Adriaan van Kekem
192         <adriaanvk@gmail.com>, thanks!
193         Pass onRemoveCallback along in Insert. Fixes bugs #324528 and
194         #382644. Patch provided by Juraj Skripsky <juraj@hotfeet.ch>,
195         thanks!
197 2008-06-18  Marek Habersack  <mhabersack@novell.com>
199         * SqlCacheDependency.cs: added
201 2008-05-30  Marek Habersack  <mhabersack@novell.com>
203         * CacheDependency.cs: do not use synthetized event accessors (to
204         avoid locks).
206 2008-05-23  Marek Habersack  <mhabersack@novell.com>
208         * Cache.cs: optimize lock usage
210 2008-04-28  Marek Habersack  <mhabersack@novell.com>
212         * Cache.cs: refactoring - move the timeout setting code to
213         separate methods, so that it can be accessed from outside the
214         class. Fixes bug #382644
216 2008-03-18  Geoff Norton  <gnorton@novell.com>
218         * Cache.cs:  MS allows calling Insert in a removed handler, we need to
219         avoid double locking here otherwise the Insert will never succeed.
221 2008-02-26  Kornél Pál  <kornelpal@gmail.com>
223         * CachedRawResponse.cs, OutputCacheModule.cs: Don't add Date header because
224         servers usually add a Date header that would result in duplicate Date header
225         sent to the client. Fixes bug #363404.
227 2007-12-31  Vladimir Krasnov  <vladimirk@maimsoft.com>
229         * Cache.cs: added DependencyCache property, a cache object for
230         creating dependencies
232 2007-12-19  Juraj Skripsky  <js@hotfeet.ch>
234         * Cache.cs: Replace periodic timer (60s) with per-cache-item expiration
235         timers.
237 2007-08-17  Marek Habersack  <mhabersack@novell.com>
239         * CacheDependency.cs: use DependencyChanged as a list of events.
240         OnChanged now calls OnDependencyChanged, to notify
241         AggregateCacheDependency that it has changed. Fixes bug #82419.
243 2007-08-14  Marek Habersack  <mhabersack@novell.com>
245         * AggregateCacheDependency.cs: propagate changes in any child
246         dependencies to the base class.
248 2007-06-25 Juraj Skripsky <js@hotfeet.ch>
250         * Cache.cs: Re-introduce "InvokePrivateCallbacks" accidentally
251         removed in r80321.
253 2007-06-20  Marek Habersack  <mhabersack@novell.com>
255         * OutputCacheModule.cs: use Context.InternalCache.
257         * Cache.cs: 2.0 profile uses generic containers to keep the cache
258         entries.
259         Gotten rid of the InsertPrivate and InsertInternal methods. The
260         latter was moved to one of the Insert overloads.
261         Private entries are no longer handled specifically, because the
262         internal cache is now kept in a separate object.
263         Iterate over the entries when filling the ArrayList in the 2.0
264         profile to avoid type cast exceptions.
266 2007-05-03 Igor Zelmanovich <igorz@mainsoft.com>
268         * AggregateCacheDependency.cs:
269         * CacheDependency.cs:   
270         added missing API.      
272 2007-04-10  Marek Habersack  <mhabersack@novell.com>
274         * CacheDependency.cs: add the NotifyFilters.Size to the
275         watcher flags, so that we watch for modifications to a file when
276         using Linux inotify.
278 2006-11-29  Marek Habersack  <grendello@gmail.com>
280         * CachedVaryBy.cs: Make sure that the vary:* header is generated
281         only when allowed under the 2.0 profile.
283 2006-11-25  Marek Habersack  <grendello@gmail.com>
285         * AggregateCacheDependency.cs: A small code optimization.
287 2006-11-14 Marek Habersack <grendel@caudium.net>
289         * Cache.cs:
290         * CacheDependency.cs:
291         * AggregateCacheDependency.cs: implement this one.
293 2006-09-11 Andrew Skiba <andrews@mainsoft.com>
295         * CacheDependency.cs: ifdef TARGET_JVM
297 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
299         * CacheDependency.cs:
300         * Cache.cs: check dependencies on other cache keys. Fixes bug #79002.
302 2006-03-18  Robert Jordan  <robertj@gmx.net>
304         * OutputCacheModule.cs: invoke the validation callbacks of
305         HttpCachePolicy. Fixes bug #77825.
307 2006-03-14  Robert Jordan  <robertj@gmx.net>
309         * CachedVaryBy.cs: Fixed VaryByParam="*". Replaced request.Param
310         with QueryString and Form lookups. Made the param name output case
311         insensitive. Fixes bug #77757.
313 2005-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
315         * Cache.cs: new internal method.
317 2005-09-08  Eyal Alaluf  <eyala@mainsoft.com>
318         * OutputCacheModule.cs: Use C# 1.0 style of delegate instantiating.
319           Needed to compile Grasshopper (TARGET_J2EE) which uses MS C# 1.0
320           compiler and does not use msc.
322 2005-09-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
324         * Cache.cs: ignore exceptions thrown by removed item callbacks.
326 2005-09-02  Sebastien Pouliot  <sebastien@ximian.com>
328         * Cache.cs: Added security permissions with Minimal level for
329         AspNetHostingPermissionLevel (only LinkDemand as the class is sealed).
330         * CacheDependency.cs: : Added security permissions with Minimal level 
331         for AspNetHostingPermissionLevel (note class is sealed only in 1.x).
333 2005-09-01 Eyal Alaluf <eyala@mainsoft.com>
334         * CacheDependency.cs: TARGET_J2EE fixes.
336 2005-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
338         * CacheDependency.cs: add missing ctor.
340 2005-08-15  Jackson Harper  <jackson@ximian.com>
342         * CacheItemPriority.cs:
343         * CacheItemRemovedCallback.cs:
344         * CacheItemRemovedReason.cs: New implementations.
346 2005-07-30  Miguel de Icaza  <miguel@novell.com>
348         * OutputCacheModule.cs: Make synchronous.
350 2005-07-15 Lluis Sanchez Gual <lluis@novell.com>
352         * Cache.cs: New implementation.
353         * CacheDependency.cs: New implementation.
355 2005-06-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
357         * Cache.cs: added new InsertPrivate overload.
359 2005-06-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
361         * Cache.cs: 
362         * CacheEntry.cs: style. Removed doc. comments.
364 2005-06-08 Ilya Kharmatsky <ilyak-at-mainsoft.com>
365         
366         * CacheDependency.cs - added TARGET_JVM directives in places,
367           where file watching is using (Mainsoft's implementation currently
368           doesn't support the feature).
370 2005-05-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
372         * CacheEntry.cs: credits for this patch should go to mcs. it catched
373         that the code after 'if ((_enumFlags & Flags.Removed) != 0)' was
374         unreachable.
376 2005-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
378         * ExpiresBuckets.cs:
379         * Cache.cs:
380         * CacheExpires.cs: fix NullReferenceException thrown sometimes when
381         using sliding expiration and under high load. Patch by Eyal Alayuf from
382         Mainsoft.
384 2005-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
386         * CacheDependency.cs: remove warnings.
388 2005-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
390         * CachedVaryBy.cs: fixed VaryByParam and wildcard (*). Patch by Ilya
391         Kharmatsky (Mainsoft) that fixes bug #73981.
393 2005-04-01  Lluis Sanchez Gual <lluis@novell.com>
395         * CachedRawResponse.cs: Fix warning.
397 2004-11-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
399         * CacheEntry.cs: convert the external DateTime to GMT, as everything
400         else uses that timezone. Fixes bug #69194.
402 2004-10-03 Ben Maurer  <bmaurer@ximian.com>
404         * Cache.cs, CacheEntry.cs, CacheExpires.cs, ExpiresBuckets.cs:
405         use UtcNow rather than Now.
407 2004-05-27      Patrik Torstensson <totte@hiddenpeaks.com>
409         * ExpiresBucket.cs (FlushExpiredItems): fix csc and a typo bug
411 2004-05-27      Patrik Torstensson <totte@hiddenpeaks.com>
413         * CacheEntry.cs,CacheExpires.cs,ExpiresBucket.cs,
414           Cache.cs : Fixed deadlock issues, fixed
415           items not correctly being flushed, fixed update
416           of item when expiration has been updated more
417           than 1 min (placed in wrong bucket), 
418           fixed deadlock during cache callback when item 
419           is removed due to expiriation.
420           
421           Rewrite of locking handling in Cache class, leading
422           to better performance and less bugs.
423           
424           This rewrite is due to a number of bugs found
425           in the output caching during load (leading to memory 
426           leaks and deadlocks)
428 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
430         * ExpiresBucket.cs: Style changes plus;
431         (Update): Fixed possible lock bug (bug 54531)
432         (Expand): remove lock optimization due to it can cause newly 
433         added items to be lost.
434         (Remove): fixed possible lock bug.
435                 
436 2004-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
438         * Cache.cs: fix from Jan Jaros for NullRef (bug #56996).
440 2004-04-07  Lluis Sanchez Gual <lluis@ximian.com>
442         * Cache.cs, CacheEntry.cs, ExpiresBuckets.cs: The value to use to
443         specify infinite timeout in ReaderWriterLock is -1, not 0.
445 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
447         * Watcher.cs: Removed file. Jackson made it obsolete and already
448         removed it from the .sources file.
450 2004-02-09  Jackson Harper <jackson@ximian.com>
452         * ExpiresBucket.cs: Remove duplicate code. Fixes bug #54031.
453         
454 2004-02-09  Jackson Harper <jackson@ximian.com>
456         * Cache.cs: Close entries that are removed.
457         * CacheDependency.cs: Use FileSystemWatcher instead of custom
458         Watcher for file dependencies.
459         * OutputCacheModule.cs: Make the varyby objects dependent on the
460         cached page.
461         
462 2004-02-05  Jackson Harper <jackson@ximian.com>
464         * CacheDependency.cs: Handle cache keys that have not been added
465         to the cache yet.
466         
467 2004-02-02  Jackson Harper <jackson@ximian.com>
469         * OutputCacheModule.cs: We can use file dependancies now.
470         
471 2004-01-14  Jackson Harper <jackson@ximian.com>
473         * Cache.cs: Return null when items are expired but have not been
474         removed yet.
475         * OutputCacheModule.cs: Handle sliding expirations. Remove hacks
476         checking if the item is expired, the cache no longer returns
477         expired items.
478         
479 2004-01-14  Jackson Harper <jackson@ximian.com>
481         * Cache.cs: When using sliding expiration update the cache objects
482         expires time as well as the expires entry expire time because the
483         objects expire time is checked when objects are pulled out. This
484         fixex bug #52778.
485         
486 2004-01-11  Jackson Harper <jackson@ximian.com>
488         * OutputCacheModule.cs: Remove varyby objects when there are no
489         more raw responses that belong to them.
490         * CachedRawResponse.cs: Keep a reference to the VaryBy object that
491         this response belongs to this is so the varyby can be cleaned up.
492         * CachedVaryBy.cs: Keep a reference to the keys that belong to the
493         varyby and a reference to the varyby's key.
494         
495 2004-01-04  Jackson Harper <jackson@ximian.com>
497         * OutputCacheModule.cs: Dont cache items when trace is enabled.
498         
499 2004-01-04  Jackson Harper <jackson@ximian.com>
501         * OutputCacheModule.cs: Update the date header value.
502         * CachedRawResponse.cs: Expose a ref to the date header, so it can
503         be easily set/updated. Remove unused methods and vars.
504         
505 2004-01-04  Jackson Harper <jackson@ximian.com>
507         * CacheDependency.cs: Copy all the entries into the entries array,
508         set on removed callback for items that we are dependent on.
509         * Cache.cs: Add method to get CacheEntry objects.
510         * OutputCacheModule.cs: Make raw repsonse entries dependent on 
511         their varyby param entries.
513 2004-01-04  Jackson Harper <jackson@ximian.com>
515         * OutputCacheModule.cs: VaryBy keys now need the HttpContext not just the request.
516         * CachedVaryBy.cs: Handle vary by headers, and vary by custom.
517         
518 2004-01-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
520         * ExpiresBuckets.cs: set _intPos when expanding the array. Fixes bug
521         52541. Patch by Jan Jaros (mono-bug@jerryweb.info).
523 2003-11-21  Jackson Harper <jackson@ximian.com>
525         * OutputCacheModule.cs: Only cache a page if it has a 200 status
526         code. Fix tabbing.
527         * CachedVaryBy.cs: Give raw response keys a name, use the
528         httpmethod in the key, and delimit items with \n so it is easier
529         to read when debugging.
530         
531 2003-11-21  Jackson Harper <jackson@ximian.com>
533         * OutputCacheModule.cs: Store a CachedVaryBy object for each
534         cached page. Then store a CachedRawResponse for each combination
535         of varried parameters for a page.
536         * CachedRawResponse.cs: Do not need to store param values anymore
537         those are stored in the CachedVaryBy now. Get the content length
538         so we dont send back the entire buffer.
539         * CachedVaryBy.cs: New file - holds the varyby data for a page,
540         and a method to generate a key based on params. Right now this
541         only works with VaryByParams. TODO: support VaryByHeaders and
542         VaryByCustom.
543         
544 2003-11-20  Jackson Harper <jackson@ximian.com>
546         * Cache.cs: New method so non public cache items can be added.
547         * CachedRawResponse.cs: New file - A snapshot of a response that
548         is stored in the cache and can be used to create a new response.
549         * OutputCacheModule.cs: Module for inserting and retrieving
550         responses from the cache.
551         
552 2003-04-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
554         * CacheDependency.cs:
555         * CacheEntry.cs:
556         * Watcher.cs: added a FileSystemWatcher-like class for dependency checking.
558 2003-03-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
560         * Cache.cs:
561         * CacheDefinitions.cs:
562         * CacheDependency.cs:
563         * CacheEntry.cs:
564         * CacheExpires.cs:
565         * ExpiresBuckets.cs: reformatted, make class status page happier. Does
566         not work yet (wait for the next patch).
568 2002-12-27  Daniel Cazzulino <dcazzulino@users.sf.net>
570         * CacheEntry.cs: several changes. New constants, use of constants
571         defined in Cache.cs, modified locks to optimize perf. Fixed property
572         sets which weren't using the keyword value to set the new values
573         (don't know how this worked before!).
575         * Cache.cs: changed singleton implementation to only create the object
576         when actually used. Changed Insert overloads to use constants
577         defined instead of hard values.
579         * ExpiresBuchets: major changes. All locking now uses ReaderWriterLock
580         class. Bucket now efectively reuses free indexes from removed items
581         to avoid unnecessary expansions. Expansion now uses Array.CopyTo to
582         add elements to the new list. Added private Int32Collection to
583         handle int indexes efficiently (thanks Shawn Van Ness). See comments
584         there.
586 2002-10-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
588         * Cache.cs: little fixes.
590 2002-07-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
592         * CacheDefinitions.cs: fixed a couple of enums.
594         * CacheDependency.cs: the class is sealed.
596 2002-06-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
598         * CacheDependency.cs: fixed a couple of typos and don't throw
599         NotImplementedException in constructors.
601 2001-12-21      Gaurav Vaish <gvaish@iitk.ac.in>
603         * CacheDependency.cs:    Some unimplemented methods to make build
605 2001-07-20      Patrik Torstensson (Patrik.Torstensson@labs2.com)
607         * Cache.cs:     Implemented. (90% ready)
608         * CacheDefinitions.cs: Implemented.
609         * CacheDependency.cs: Added. (20% ready)
610         * CacheExpires: Implemented.
611         * CacheEntry.cs: Implemented. (95% ready, going to be changed due to CacheDependecy support)
612         * ExpiresBuckets.cs: Implemented.