1 2009-10-05 Marek Habersack <mhabersack@novell.com>
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
9 2009-09-26 Marek Habersack <mhabersack@novell.com>
11 * CacheItemPriorityQueue.cs, CacheItem.cs, CacheItemEnumerator.cs:
14 * Cache.cs: factored out CacheItem and CacheItemEnumerator to
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.
23 2009-03-03 Marek Habersack <mhabersack@novell.com>
25 * CachedRawResponse.cs: headers are stored in NameValueCollection
28 2009-01-09 Marek Habersack <mhabersack@novell.com>
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
36 2008-10-21 Marek Habersack <mhabersack@novell.com>
38 * OutputCacheModule.cs: seal the class.
39 Made OnRawResponseRemoved a static method.
41 * CachedVaryBy.cs: seal the class.
42 Use portable line terminators instead of literal '\n'.
44 * Cache.cs: seal the CacheItem and CacheItemEnumerator classes.
46 * CacheDependency.cs: dispose the associated dependency in the
47 DependencyDispose method.
49 * CachedRawResponse.cs: seal the class
51 2008-10-15 Marek Habersack <mhabersack@novell.com>
53 * OutputCacheModule.cs: do not take any action if Response returns
54 null from GetCachedResponse.
56 2008-09-30 Juraj Skripsky <js@hotfeet.ch>
58 * CachedRawResponse.cs: Don't allocate a 32k buffer that is never
59 used. Fixes enhancement bug #430963.
61 2008-09-29 Marek Habersack <mhabersack@novell.com>
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
68 2008-09-26 Juraj Skripsky <js@hotfeet.ch>
70 * OutputCacheModule.cs: Consistently use InternalCache for
71 CachedRawResponse items and Cache for CachedVaryBy items.
72 Partial fix for bug #429926.
74 2008-08-11 Marek Habersack <mhabersack@novell.com>
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>,
83 2008-06-18 Marek Habersack <mhabersack@novell.com>
85 * SqlCacheDependency.cs: added
87 2008-05-30 Marek Habersack <mhabersack@novell.com>
89 * CacheDependency.cs: do not use synthetized event accessors (to
92 2008-05-23 Marek Habersack <mhabersack@novell.com>
94 * Cache.cs: optimize lock usage
96 2008-04-28 Marek Habersack <mhabersack@novell.com>
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
102 2008-03-18 Geoff Norton <gnorton@novell.com>
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.
107 2008-02-26 Kornél Pál <kornelpal@gmail.com>
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.
113 2007-12-31 Vladimir Krasnov <vladimirk@maimsoft.com>
115 * Cache.cs: added DependencyCache property, a cache object for
116 creating dependencies
118 2007-12-19 Juraj Skripsky <js@hotfeet.ch>
120 * Cache.cs: Replace periodic timer (60s) with per-cache-item expiration
123 2007-08-17 Marek Habersack <mhabersack@novell.com>
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.
129 2007-08-14 Marek Habersack <mhabersack@novell.com>
131 * AggregateCacheDependency.cs: propagate changes in any child
132 dependencies to the base class.
134 2007-06-25 Juraj Skripsky <js@hotfeet.ch>
136 * Cache.cs: Re-introduce "InvokePrivateCallbacks" accidentally
139 2007-06-20 Marek Habersack <mhabersack@novell.com>
141 * OutputCacheModule.cs: use Context.InternalCache.
143 * Cache.cs: 2.0 profile uses generic containers to keep the cache
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.
152 2007-05-03 Igor Zelmanovich <igorz@mainsoft.com>
154 * AggregateCacheDependency.cs:
155 * CacheDependency.cs:
158 2007-04-10 Marek Habersack <mhabersack@novell.com>
160 * CacheDependency.cs: add the NotifyFilters.Size to the
161 watcher flags, so that we watch for modifications to a file when
164 2006-11-29 Marek Habersack <grendello@gmail.com>
166 * CachedVaryBy.cs: Make sure that the vary:* header is generated
167 only when allowed under the 2.0 profile.
169 2006-11-25 Marek Habersack <grendello@gmail.com>
171 * AggregateCacheDependency.cs: A small code optimization.
173 2006-11-14 Marek Habersack <grendel@caudium.net>
176 * CacheDependency.cs:
177 * AggregateCacheDependency.cs: implement this one.
179 2006-09-11 Andrew Skiba <andrews@mainsoft.com>
181 * CacheDependency.cs: ifdef TARGET_JVM
183 2006-08-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
185 * CacheDependency.cs:
186 * Cache.cs: check dependencies on other cache keys. Fixes bug #79002.
188 2006-03-18 Robert Jordan <robertj@gmx.net>
190 * OutputCacheModule.cs: invoke the validation callbacks of
191 HttpCachePolicy. Fixes bug #77825.
193 2006-03-14 Robert Jordan <robertj@gmx.net>
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.
199 2005-10-24 Gonzalo Paniagua Javier <gonzalo@ximian.com>
201 * Cache.cs: new internal method.
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.
208 2005-09-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
210 * Cache.cs: ignore exceptions thrown by removed item callbacks.
212 2005-09-02 Sebastien Pouliot <sebastien@ximian.com>
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).
219 2005-09-01 Eyal Alaluf <eyala@mainsoft.com>
220 * CacheDependency.cs: TARGET_J2EE fixes.
222 2005-08-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
224 * CacheDependency.cs: add missing ctor.
226 2005-08-15 Jackson Harper <jackson@ximian.com>
228 * CacheItemPriority.cs:
229 * CacheItemRemovedCallback.cs:
230 * CacheItemRemovedReason.cs: New implementations.
232 2005-07-30 Miguel de Icaza <miguel@novell.com>
234 * OutputCacheModule.cs: Make synchronous.
236 2005-07-15 Lluis Sanchez Gual <lluis@novell.com>
238 * Cache.cs: New implementation.
239 * CacheDependency.cs: New implementation.
241 2005-06-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
243 * Cache.cs: added new InsertPrivate overload.
245 2005-06-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
248 * CacheEntry.cs: style. Removed doc. comments.
250 2005-06-08 Ilya Kharmatsky <ilyak-at-mainsoft.com>
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).
256 2005-05-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
258 * CacheEntry.cs: credits for this patch should go to mcs. it catched
259 that the code after 'if ((_enumFlags & Flags.Removed) != 0)' was
262 2005-04-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
266 * CacheExpires.cs: fix NullReferenceException thrown sometimes when
267 using sliding expiration and under high load. Patch by Eyal Alayuf from
270 2005-04-20 Gonzalo Paniagua Javier <gonzalo@ximian.com>
272 * CacheDependency.cs: remove warnings.
274 2005-04-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
276 * CachedVaryBy.cs: fixed VaryByParam and wildcard (*). Patch by Ilya
277 Kharmatsky (Mainsoft) that fixes bug #73981.
279 2005-04-01 Lluis Sanchez Gual <lluis@novell.com>
281 * CachedRawResponse.cs: Fix warning.
283 2004-11-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
285 * CacheEntry.cs: convert the external DateTime to GMT, as everything
286 else uses that timezone. Fixes bug #69194.
288 2004-10-03 Ben Maurer <bmaurer@ximian.com>
290 * Cache.cs, CacheEntry.cs, CacheExpires.cs, ExpiresBuckets.cs:
291 use UtcNow rather than Now.
293 2004-05-27 Patrik Torstensson <totte@hiddenpeaks.com>
295 * ExpiresBucket.cs (FlushExpiredItems): fix csc and a typo bug
297 2004-05-27 Patrik Torstensson <totte@hiddenpeaks.com>
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.
307 Rewrite of locking handling in Cache class, leading
308 to better performance and less bugs.
310 This rewrite is due to a number of bugs found
311 in the output caching during load (leading to memory
314 2004-05-16 Patrik Torstensson <totte@hiddenpeaks.com>
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.
322 2004-04-16 Gonzalo Paniagua Javier <gonzalo@ximian.com>
324 * Cache.cs: fix from Jan Jaros for NullRef (bug #56996).
326 2004-04-07 Lluis Sanchez Gual <lluis@ximian.com>
328 * Cache.cs, CacheEntry.cs, ExpiresBuckets.cs: The value to use to
329 specify infinite timeout in ReaderWriterLock is -1, not 0.
331 2004-03-19 Gonzalo Paniagua Javier <gonzalo@ximian.com>
333 * Watcher.cs: Removed file. Jackson made it obsolete and already
334 removed it from the .sources file.
336 2004-02-09 Jackson Harper <jackson@ximian.com>
338 * ExpiresBucket.cs: Remove duplicate code. Fixes bug #54031.
340 2004-02-09 Jackson Harper <jackson@ximian.com>
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
348 2004-02-05 Jackson Harper <jackson@ximian.com>
350 * CacheDependency.cs: Handle cache keys that have not been added
353 2004-02-02 Jackson Harper <jackson@ximian.com>
355 * OutputCacheModule.cs: We can use file dependancies now.
357 2004-01-14 Jackson Harper <jackson@ximian.com>
359 * Cache.cs: Return null when items are expired but have not been
361 * OutputCacheModule.cs: Handle sliding expirations. Remove hacks
362 checking if the item is expired, the cache no longer returns
365 2004-01-14 Jackson Harper <jackson@ximian.com>
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
372 2004-01-11 Jackson Harper <jackson@ximian.com>
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.
381 2004-01-04 Jackson Harper <jackson@ximian.com>
383 * OutputCacheModule.cs: Dont cache items when trace is enabled.
385 2004-01-04 Jackson Harper <jackson@ximian.com>
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.
391 2004-01-04 Jackson Harper <jackson@ximian.com>
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.
399 2004-01-04 Jackson Harper <jackson@ximian.com>
401 * OutputCacheModule.cs: VaryBy keys now need the HttpContext not just the request.
402 * CachedVaryBy.cs: Handle vary by headers, and vary by custom.
404 2004-01-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
406 * ExpiresBuckets.cs: set _intPos when expanding the array. Fixes bug
407 52541. Patch by Jan Jaros (mono-bug@jerryweb.info).
409 2003-11-21 Jackson Harper <jackson@ximian.com>
411 * OutputCacheModule.cs: Only cache a page if it has a 200 status
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.
417 2003-11-21 Jackson Harper <jackson@ximian.com>
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
430 2003-11-20 Jackson Harper <jackson@ximian.com>
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.
438 2003-04-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
440 * CacheDependency.cs:
442 * Watcher.cs: added a FileSystemWatcher-like class for dependency checking.
444 2003-03-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
447 * CacheDefinitions.cs:
448 * CacheDependency.cs:
451 * ExpiresBuckets.cs: reformatted, make class status page happier. Does
452 not work yet (wait for the next patch).
454 2002-12-27 Daniel Cazzulino <dcazzulino@users.sf.net>
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!).
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.
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
472 2002-10-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
474 * Cache.cs: little fixes.
476 2002-07-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
478 * CacheDefinitions.cs: fixed a couple of enums.
480 * CacheDependency.cs: the class is sealed.
482 2002-06-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
484 * CacheDependency.cs: fixed a couple of typos and don't throw
485 NotImplementedException in constructors.
487 2001-12-21 Gaurav Vaish <gvaish@iitk.ac.in>
489 * CacheDependency.cs: Some unimplemented methods to make build
491 2001-07-20 Patrik Torstensson (Patrik.Torstensson@labs2.com)
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.