b6cac9bd14fe1934c8204cf2ec532b8ec2dcbfe8
[mono.git] / mcs / class / System.Web / System.Web.Caching / ChangeLog
1 2009-10-05  Marek Habersack  <mhabersack@novell.com>
2
3         * Cache.cs: if item expiration time exceeds the maximum value
4         Timer accepts, use the latter - item will expire properly anyway,
5         as the timer will be rescheduled for the item's expiration time
6         once that item is bubbled to the top of the priority queue. Fixes
7         bug #544171
8
9 2009-09-26  Marek Habersack  <mhabersack@novell.com>
10
11         * CacheItemPriorityQueue.cs, CacheItem.cs, CacheItemEnumerator.cs:
12         added
13
14         * Cache.cs: factored out CacheItem and CacheItemEnumerator to
15         separate files.
16         Use reader-writer locks instead of Monitor.
17         Added two 3.5sp1 properties - EffectivePrivateBytesLimit and
18         EffectivePercentagePhysicalMemoryLimit.
19         Added support for disabling cache item expiration.
20         One timer is used to expire all timed items (instead of one timer
21         per item). Timed items are kept in a priority queue.
22
23 2009-03-03  Marek Habersack  <mhabersack@novell.com>
24
25         * CachedRawResponse.cs: headers are stored in NameValueCollection
26         now.
27
28 2009-01-09  Marek Habersack  <mhabersack@novell.com>
29
30         * Cache.cs: System.Threading.Timer.Change takes a long, not an
31         int. The maximum value of sliding expiration is 365 days
32         (31536000000ms) which fits within the value range of long. The
33         previous cast to int might yield negative values in certain
34         situations which was the reason for bug #464221. Fixes bug #464221
35
36 2008-10-21  Marek Habersack  <mhabersack@novell.com>
37
38         * OutputCacheModule.cs: seal the class.
39         Made OnRawResponseRemoved a static method.
40
41         * CachedVaryBy.cs: seal the class.
42         Use portable line terminators instead of literal '\n'.
43
44         * Cache.cs: seal the CacheItem and CacheItemEnumerator classes.
45
46         * CacheDependency.cs: dispose the associated dependency in the
47         DependencyDispose method.
48
49         * CachedRawResponse.cs: seal the class
50
51 2008-10-15  Marek Habersack  <mhabersack@novell.com>
52
53         * OutputCacheModule.cs: do not take any action if Response returns
54         null from GetCachedResponse.
55
56 2008-09-30  Juraj Skripsky  <js@hotfeet.ch>
57
58         * CachedRawResponse.cs: Don't allocate a 32k buffer that is never 
59         used. Fixes enhancement bug #430963.
60
61 2008-09-29  Marek Habersack  <mhabersack@novell.com>
62
63         * OutputCacheModule.cs: invalidate cache entries when the
64         corresponding source file (.as?x) is recompiled by hooking up to
65         System.Web.Compilation.BuildManager's build cache entry removal
66         event. Fixes bug #429926
67
68 2008-09-26  Juraj Skripsky  <js@hotfeet.ch>
69
70         * OutputCacheModule.cs: Consistently use InternalCache for
71         CachedRawResponse items and Cache for CachedVaryBy items.
72         Partial fix for bug #429926.   
73
74 2008-08-11  Marek Habersack  <mhabersack@novell.com>
75
76         * Cache.cs: dispose item timer when removing an entry. Fixes bug
77         #416076. Patch provided by Adriaan van Kekem
78         <adriaanvk@gmail.com>, thanks!
79         Pass onRemoveCallback along in Insert. Fixes bugs #324528 and
80         #382644. Patch provided by Juraj Skripsky <juraj@hotfeet.ch>,
81         thanks!
82
83 2008-06-18  Marek Habersack  <mhabersack@novell.com>
84
85         * SqlCacheDependency.cs: added
86
87 2008-05-30  Marek Habersack  <mhabersack@novell.com>
88
89         * CacheDependency.cs: do not use synthetized event accessors (to
90         avoid locks).
91
92 2008-05-23  Marek Habersack  <mhabersack@novell.com>
93
94         * Cache.cs: optimize lock usage
95
96 2008-04-28  Marek Habersack  <mhabersack@novell.com>
97
98         * Cache.cs: refactoring - move the timeout setting code to
99         separate methods, so that it can be accessed from outside the
100         class. Fixes bug #382644
101
102 2008-03-18  Geoff Norton  <gnorton@novell.com>
103
104         * Cache.cs:  MS allows calling Insert in a removed handler, we need to
105         avoid double locking here otherwise the Insert will never succeed.
106
107 2008-02-26  Kornél Pál  <kornelpal@gmail.com>
108
109         * CachedRawResponse.cs, OutputCacheModule.cs: Don't add Date header because
110         servers usually add a Date header that would result in duplicate Date header
111         sent to the client. Fixes bug #363404.
112
113 2007-12-31  Vladimir Krasnov  <vladimirk@maimsoft.com>
114
115         * Cache.cs: added DependencyCache property, a cache object for
116         creating dependencies
117
118 2007-12-19  Juraj Skripsky  <js@hotfeet.ch>
119
120         * Cache.cs: Replace periodic timer (60s) with per-cache-item expiration
121         timers.
122
123 2007-08-17  Marek Habersack  <mhabersack@novell.com>
124
125         * CacheDependency.cs: use DependencyChanged as a list of events.
126         OnChanged now calls OnDependencyChanged, to notify
127         AggregateCacheDependency that it has changed. Fixes bug #82419.
128
129 2007-08-14  Marek Habersack  <mhabersack@novell.com>
130
131         * AggregateCacheDependency.cs: propagate changes in any child
132         dependencies to the base class.
133
134 2007-06-25 Juraj Skripsky <js@hotfeet.ch>
135
136         * Cache.cs: Re-introduce "InvokePrivateCallbacks" accidentally
137         removed in r80321.
138
139 2007-06-20  Marek Habersack  <mhabersack@novell.com>
140
141         * OutputCacheModule.cs: use Context.InternalCache.
142
143         * Cache.cs: 2.0 profile uses generic containers to keep the cache
144         entries.
145         Gotten rid of the InsertPrivate and InsertInternal methods. The
146         latter was moved to one of the Insert overloads.
147         Private entries are no longer handled specifically, because the
148         internal cache is now kept in a separate object.
149         Iterate over the entries when filling the ArrayList in the 2.0
150         profile to avoid type cast exceptions.
151
152 2007-05-03 Igor Zelmanovich <igorz@mainsoft.com>
153
154         * AggregateCacheDependency.cs:
155         * CacheDependency.cs:   
156         added missing API.      
157
158 2007-04-10  Marek Habersack  <mhabersack@novell.com>
159
160         * CacheDependency.cs: add the NotifyFilters.Size to the
161         watcher flags, so that we watch for modifications to a file when
162         using Linux inotify.
163
164 2006-11-29  Marek Habersack  <grendello@gmail.com>
165
166         * CachedVaryBy.cs: Make sure that the vary:* header is generated
167         only when allowed under the 2.0 profile.
168
169 2006-11-25  Marek Habersack  <grendello@gmail.com>
170
171         * AggregateCacheDependency.cs: A small code optimization.
172
173 2006-11-14 Marek Habersack <grendel@caudium.net>
174
175         * Cache.cs:
176         * CacheDependency.cs:
177         * AggregateCacheDependency.cs: implement this one.
178
179 2006-09-11 Andrew Skiba <andrews@mainsoft.com>
180
181         * CacheDependency.cs: ifdef TARGET_JVM
182
183 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
184
185         * CacheDependency.cs:
186         * Cache.cs: check dependencies on other cache keys. Fixes bug #79002.
187
188 2006-03-18  Robert Jordan  <robertj@gmx.net>
189
190         * OutputCacheModule.cs: invoke the validation callbacks of
191         HttpCachePolicy. Fixes bug #77825.
192
193 2006-03-14  Robert Jordan  <robertj@gmx.net>
194
195         * CachedVaryBy.cs: Fixed VaryByParam="*". Replaced request.Param
196         with QueryString and Form lookups. Made the param name output case
197         insensitive. Fixes bug #77757.
198
199 2005-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
200
201         * Cache.cs: new internal method.
202
203 2005-09-08  Eyal Alaluf  <eyala@mainsoft.com>
204         * OutputCacheModule.cs: Use C# 1.0 style of delegate instantiating.
205           Needed to compile Grasshopper (TARGET_J2EE) which uses MS C# 1.0
206           compiler and does not use msc.
207
208 2005-09-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
209
210         * Cache.cs: ignore exceptions thrown by removed item callbacks.
211
212 2005-09-02  Sebastien Pouliot  <sebastien@ximian.com>
213
214         * Cache.cs: Added security permissions with Minimal level for
215         AspNetHostingPermissionLevel (only LinkDemand as the class is sealed).
216         * CacheDependency.cs: : Added security permissions with Minimal level 
217         for AspNetHostingPermissionLevel (note class is sealed only in 1.x).
218
219 2005-09-01 Eyal Alaluf <eyala@mainsoft.com>
220         * CacheDependency.cs: TARGET_J2EE fixes.
221
222 2005-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
223
224         * CacheDependency.cs: add missing ctor.
225
226 2005-08-15  Jackson Harper  <jackson@ximian.com>
227
228         * CacheItemPriority.cs:
229         * CacheItemRemovedCallback.cs:
230         * CacheItemRemovedReason.cs: New implementations.
231
232 2005-07-30  Miguel de Icaza  <miguel@novell.com>
233
234         * OutputCacheModule.cs: Make synchronous.
235
236 2005-07-15 Lluis Sanchez Gual <lluis@novell.com>
237
238         * Cache.cs: New implementation.
239         * CacheDependency.cs: New implementation.
240
241 2005-06-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
242
243         * Cache.cs: added new InsertPrivate overload.
244
245 2005-06-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
246
247         * Cache.cs: 
248         * CacheEntry.cs: style. Removed doc. comments.
249
250 2005-06-08 Ilya Kharmatsky <ilyak-at-mainsoft.com>
251         
252         * CacheDependency.cs - added TARGET_JVM directives in places,
253           where file watching is using (Mainsoft's implementation currently
254           doesn't support the feature).
255
256 2005-05-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
257
258         * CacheEntry.cs: credits for this patch should go to mcs. it catched
259         that the code after 'if ((_enumFlags & Flags.Removed) != 0)' was
260         unreachable.
261
262 2005-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
263
264         * ExpiresBuckets.cs:
265         * Cache.cs:
266         * CacheExpires.cs: fix NullReferenceException thrown sometimes when
267         using sliding expiration and under high load. Patch by Eyal Alayuf from
268         Mainsoft.
269
270 2005-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
271
272         * CacheDependency.cs: remove warnings.
273
274 2005-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
275
276         * CachedVaryBy.cs: fixed VaryByParam and wildcard (*). Patch by Ilya
277         Kharmatsky (Mainsoft) that fixes bug #73981.
278
279 2005-04-01  Lluis Sanchez Gual <lluis@novell.com>
280
281         * CachedRawResponse.cs: Fix warning.
282
283 2004-11-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
284
285         * CacheEntry.cs: convert the external DateTime to GMT, as everything
286         else uses that timezone. Fixes bug #69194.
287
288 2004-10-03 Ben Maurer  <bmaurer@ximian.com>
289
290         * Cache.cs, CacheEntry.cs, CacheExpires.cs, ExpiresBuckets.cs:
291         use UtcNow rather than Now.
292
293 2004-05-27      Patrik Torstensson <totte@hiddenpeaks.com>
294
295         * ExpiresBucket.cs (FlushExpiredItems): fix csc and a typo bug
296
297 2004-05-27      Patrik Torstensson <totte@hiddenpeaks.com>
298
299         * CacheEntry.cs,CacheExpires.cs,ExpiresBucket.cs,
300           Cache.cs : Fixed deadlock issues, fixed
301           items not correctly being flushed, fixed update
302           of item when expiration has been updated more
303           than 1 min (placed in wrong bucket), 
304           fixed deadlock during cache callback when item 
305           is removed due to expiriation.
306           
307           Rewrite of locking handling in Cache class, leading
308           to better performance and less bugs.
309           
310           This rewrite is due to a number of bugs found
311           in the output caching during load (leading to memory 
312           leaks and deadlocks)
313
314 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
315
316         * ExpiresBucket.cs: Style changes plus;
317         (Update): Fixed possible lock bug (bug 54531)
318         (Expand): remove lock optimization due to it can cause newly 
319         added items to be lost.
320         (Remove): fixed possible lock bug.
321                 
322 2004-04-16  Gonzalo Paniagua Javier <gonzalo@ximian.com>
323
324         * Cache.cs: fix from Jan Jaros for NullRef (bug #56996).
325
326 2004-04-07  Lluis Sanchez Gual <lluis@ximian.com>
327
328         * Cache.cs, CacheEntry.cs, ExpiresBuckets.cs: The value to use to
329         specify infinite timeout in ReaderWriterLock is -1, not 0.
330
331 2004-03-19  Gonzalo Paniagua Javier <gonzalo@ximian.com>
332
333         * Watcher.cs: Removed file. Jackson made it obsolete and already
334         removed it from the .sources file.
335
336 2004-02-09  Jackson Harper <jackson@ximian.com>
337
338         * ExpiresBucket.cs: Remove duplicate code. Fixes bug #54031.
339         
340 2004-02-09  Jackson Harper <jackson@ximian.com>
341
342         * Cache.cs: Close entries that are removed.
343         * CacheDependency.cs: Use FileSystemWatcher instead of custom
344         Watcher for file dependencies.
345         * OutputCacheModule.cs: Make the varyby objects dependent on the
346         cached page.
347         
348 2004-02-05  Jackson Harper <jackson@ximian.com>
349
350         * CacheDependency.cs: Handle cache keys that have not been added
351         to the cache yet.
352         
353 2004-02-02  Jackson Harper <jackson@ximian.com>
354
355         * OutputCacheModule.cs: We can use file dependancies now.
356         
357 2004-01-14  Jackson Harper <jackson@ximian.com>
358
359         * Cache.cs: Return null when items are expired but have not been
360         removed yet.
361         * OutputCacheModule.cs: Handle sliding expirations. Remove hacks
362         checking if the item is expired, the cache no longer returns
363         expired items.
364         
365 2004-01-14  Jackson Harper <jackson@ximian.com>
366
367         * Cache.cs: When using sliding expiration update the cache objects
368         expires time as well as the expires entry expire time because the
369         objects expire time is checked when objects are pulled out. This
370         fixex bug #52778.
371         
372 2004-01-11  Jackson Harper <jackson@ximian.com>
373
374         * OutputCacheModule.cs: Remove varyby objects when there are no
375         more raw responses that belong to them.
376         * CachedRawResponse.cs: Keep a reference to the VaryBy object that
377         this response belongs to this is so the varyby can be cleaned up.
378         * CachedVaryBy.cs: Keep a reference to the keys that belong to the
379         varyby and a reference to the varyby's key.
380         
381 2004-01-04  Jackson Harper <jackson@ximian.com>
382
383         * OutputCacheModule.cs: Dont cache items when trace is enabled.
384         
385 2004-01-04  Jackson Harper <jackson@ximian.com>
386
387         * OutputCacheModule.cs: Update the date header value.
388         * CachedRawResponse.cs: Expose a ref to the date header, so it can
389         be easily set/updated. Remove unused methods and vars.
390         
391 2004-01-04  Jackson Harper <jackson@ximian.com>
392
393         * CacheDependency.cs: Copy all the entries into the entries array,
394         set on removed callback for items that we are dependent on.
395         * Cache.cs: Add method to get CacheEntry objects.
396         * OutputCacheModule.cs: Make raw repsonse entries dependent on 
397         their varyby param entries.
398
399 2004-01-04  Jackson Harper <jackson@ximian.com>
400
401         * OutputCacheModule.cs: VaryBy keys now need the HttpContext not just the request.
402         * CachedVaryBy.cs: Handle vary by headers, and vary by custom.
403         
404 2004-01-03  Gonzalo Paniagua Javier <gonzalo@ximian.com>
405
406         * ExpiresBuckets.cs: set _intPos when expanding the array. Fixes bug
407         52541. Patch by Jan Jaros (mono-bug@jerryweb.info).
408
409 2003-11-21  Jackson Harper <jackson@ximian.com>
410
411         * OutputCacheModule.cs: Only cache a page if it has a 200 status
412         code. Fix tabbing.
413         * CachedVaryBy.cs: Give raw response keys a name, use the
414         httpmethod in the key, and delimit items with \n so it is easier
415         to read when debugging.
416         
417 2003-11-21  Jackson Harper <jackson@ximian.com>
418
419         * OutputCacheModule.cs: Store a CachedVaryBy object for each
420         cached page. Then store a CachedRawResponse for each combination
421         of varried parameters for a page.
422         * CachedRawResponse.cs: Do not need to store param values anymore
423         those are stored in the CachedVaryBy now. Get the content length
424         so we dont send back the entire buffer.
425         * CachedVaryBy.cs: New file - holds the varyby data for a page,
426         and a method to generate a key based on params. Right now this
427         only works with VaryByParams. TODO: support VaryByHeaders and
428         VaryByCustom.
429         
430 2003-11-20  Jackson Harper <jackson@ximian.com>
431
432         * Cache.cs: New method so non public cache items can be added.
433         * CachedRawResponse.cs: New file - A snapshot of a response that
434         is stored in the cache and can be used to create a new response.
435         * OutputCacheModule.cs: Module for inserting and retrieving
436         responses from the cache.
437         
438 2003-04-09  Gonzalo Paniagua Javier <gonzalo@ximian.com>
439
440         * CacheDependency.cs:
441         * CacheEntry.cs:
442         * Watcher.cs: added a FileSystemWatcher-like class for dependency checking.
443
444 2003-03-13  Gonzalo Paniagua Javier <gonzalo@ximian.com>
445
446         * Cache.cs:
447         * CacheDefinitions.cs:
448         * CacheDependency.cs:
449         * CacheEntry.cs:
450         * CacheExpires.cs:
451         * ExpiresBuckets.cs: reformatted, make class status page happier. Does
452         not work yet (wait for the next patch).
453
454 2002-12-27  Daniel Cazzulino <dcazzulino@users.sf.net>
455
456         * CacheEntry.cs: several changes. New constants, use of constants
457         defined in Cache.cs, modified locks to optimize perf. Fixed property
458         sets which weren't using the keyword value to set the new values
459         (don't know how this worked before!).
460
461         * Cache.cs: changed singleton implementation to only create the object
462         when actually used. Changed Insert overloads to use constants
463         defined instead of hard values.
464
465         * ExpiresBuchets: major changes. All locking now uses ReaderWriterLock
466         class. Bucket now efectively reuses free indexes from removed items
467         to avoid unnecessary expansions. Expansion now uses Array.CopyTo to
468         add elements to the new list. Added private Int32Collection to
469         handle int indexes efficiently (thanks Shawn Van Ness). See comments
470         there.
471
472 2002-10-08  Gonzalo Paniagua Javier <gonzalo@ximian.com>
473
474         * Cache.cs: little fixes.
475
476 2002-07-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
477
478         * CacheDefinitions.cs: fixed a couple of enums.
479
480         * CacheDependency.cs: the class is sealed.
481
482 2002-06-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
483
484         * CacheDependency.cs: fixed a couple of typos and don't throw
485         NotImplementedException in constructors.
486
487 2001-12-21      Gaurav Vaish <gvaish@iitk.ac.in>
488
489         * CacheDependency.cs:    Some unimplemented methods to make build
490
491 2001-07-20      Patrik Torstensson (Patrik.Torstensson@labs2.com)
492
493         * Cache.cs:     Implemented. (90% ready)
494         * CacheDefinitions.cs: Implemented.
495         * CacheDependency.cs: Added. (20% ready)
496         * CacheExpires: Implemented.
497         * CacheEntry.cs: Implemented. (95% ready, going to be changed due to CacheDependecy support)
498         * ExpiresBuckets.cs: Implemented.