Commit Graph
30 Commits
Author SHA1 Message Date
Marek Safar aad016fd87 Clean up few more warnings 2010-10-15 15:20:25 +01:00
Marek Habersack 80244984a0 [asp.net,4.0] added ability to store cached user controls in specified output cache provider
This commit implements the ability to programmatically set the name of the output cache provider
to hold cached control data.

* OutputCache.cs: added DefaultProvider internal property to return whatever default provider is
  configured.
  Added GetProvider() method to return instance of a named provider
* BasePartialCachingControl.cs: cache key and cached data are store in instance fields.
  Added 4.0 internal property ProviderName which names the output cache provider to use for storage.
  Removed OnInit from 4.0 profile, replaced with an override of Control's InitRecursive. Control is
  created only when cached data is not found in the provider.
* Control.cs: made InitRecursive virtual for the benefit of BasePartialCachingControl above.
* ControlCachePolicy.cs: added 4.0 property ProviderName
2010-08-06 01:27:34 +02:00
Marek Habersack 7d005d6a34 2010-05-06 Marek Habersack <[email protected]>
* HttpResponse.cs: implemented the following 4.0 methods:
	RedirectPermanent, RedirectToRoute, RedirectToRoutePermanent and
	RemoveOutputCacheItem.

2010-05-06  Marek Habersack  <[email protected]>

	* RouteCollection.cs: GetVirtualPath throws ArgumentException
	when named route is not found in the collection.

2010-05-06  Marek Habersack  <[email protected]>

	* OutputCacheModule.cs: added a 2.0 internal property to return
	the internal provider used in this profile.

	* OutputCache.cs: added internal RemoveFromProvider method to
	remove items from the indicated provider.

svn path=/trunk/mcs/; revision=156933
2010-05-07 23:02:46 +00:00
Marek Habersack 73c3bfba56 2010-02-03 Marek Habersack <[email protected]>
* AssemblyInfo.cs: added back InternalsVisibleTo for the test
        assembly - it's needed to access CacheItemPriorityQueue

2010-02-03  Marek Habersack  <[email protected]>

        * OutputCache.cs: DefaultProviderName checks if there was any
        provider configured and, if not, returns a built-in provider's
        name.

        * SqlCacheDependencyAdmin.cs: added

        * OutputCacheProviderCollection.cs: added

        * OutputCacheProvider.cs: added

        * OutputCacheModule.cs: uses the 4.0 extensible output cache
        provider model now (also internally in the 2.0 profile)
        OutputCacheProvider is retrieved on every request using
        HttpApplication.GetOutputCacheProviderName (4.0+). In the 2.0
        profile an instance of InMemoryOutputCacheProvider is always
        returned.

        * InMemoryOutputCacheProvider.cs: default output cache provider
        for ASP.NET 4.0, also used internally in the  2.0 profile.

        * CachedVaryBy.cs: made the generated key shorter

        * CacheItemPriorityQueueDebug.cs: debugging support for
        CacheItemPriorityQueue. Most of the code is compiled only when the
        DEBUG macro is defined. Debugging support includes recording of
        the queue operations sequence which is output to an XML file on
        appdomain shutdown. The recorded sequence files can be used to
        generate NUnit test cases for the priority queue (see
        ../Test/tools/README)

        * CacheItemPriorityQueue.cs: rewritten using an array based heap
        instead of a binary tree based one - implementation is simpler,
        faster and more elegant. Heap is initially 32 entries long and
        its size is doubled every time it fills up. After reaching a
        threshold (8192 entries currently) it is shrunk to the number of
        items + 1/3 of item count in order to preserve memory.

        * CacheItem.cs: added a Guid field to easier distinguish items
        (mostly for debugging purposes)

        * CacheDependency.cs: minor performance improvements

        * Cache.cs: better handling of timer periods

2010-02-03  Marek Habersack  <[email protected]>

        * HttpApplication.cs: GetOutputCacheProviderName returns the value
        of OutputCache.DefaultProviderName

        * HttpRuntime.cs: internal cache is used to hold the dependencies
        now.

2010-02-03  Marek Habersack  <[email protected]>

        * CacheItemPriorityQueueTest_generated.cs: added

        * CacheItemPriorityQueueTest.cs: added

2010-02-04  Marek Habersack  <[email protected]>

        * Helpers.cs: added a helper method for checking of HTML mentions
        any .NET exceptions.

2010-02-03  Marek Habersack  <[email protected]>

        * Makefile: added targets to compile cache priority queue tests
        generator and to generate the tests themselves

svn path=/trunk/mcs/; revision=150855
2010-02-04 13:53:55 +00:00
Marek Habersack b40844116b More 1.1 code and NET_2_0 ifdefs removed
svn path=/trunk/mcs/; revision=145319
2009-11-03 20:19:37 +00:00
Marek Habersack 0513c6ddac 2009-10-20 Marek Habersack <[email protected]>
* OutputCacheModule.cs: keysCache and entriesToInvalidate
	dictionaries are allocated only when they are
	required. BuildManager's RemoveEntry envent is subscribed to only
	if cache actually has some entries.
	Added support for post-cache substitution.

	* CachedRawResponse.cs: data is stored in a list of DataItem
	instances instead of just in a single buffer. This enables support
	for post-cache substitution.

2009-10-20  Marek Habersack  <[email protected]>

	* HttpResponse.cs: implemented the WriteSubstitution method,
	thus enabling post-cache substitution.

svn path=/trunk/mcs/; revision=144487
2009-10-20 19:21:39 +00:00
Marek Habersack f345ffeea2 2008-10-21 Marek Habersack <[email protected]>
* CapabilitiesChecksum.cs: implement Hex and MapToHex more efficiently.

2008-10-21  Marek Habersack  <[email protected]>

	* OutputCacheModule.cs: seal the class.
	Made OnRawResponseRemoved a static method.

	* CachedVaryBy.cs: seal the class.
	Use portable line terminators instead of literal '\n'.

	* Cache.cs: seal the CacheItem and CacheItemEnumerator classes.

	* CacheDependency.cs: dispose the associated dependency in the
	DependencyDispose method.

	* CachedRawResponse.cs: seal the class

2008-10-21  Marek Habersack  <[email protected]>

	* CapabilitiesLoader.cs: seal BrowserData.
	Seal CapabilitiesLoader.
	Do not lock on typeof (CapabilitiesLoader) in GetCapabilities ().

svn path=/trunk/mcs/; revision=116583
2008-10-21 01:08:23 +00:00
Marek Habersack 5b94dd8088 2008-10-15 Marek Habersack <[email protected]>
* HttpResponse.cs: CacheabilityUpdatedEvent is no longer
	used. cached_response is allocated only when the IsCached property
	is assigned the 'true' value. 

	* HttpCachePolicy.cs: CacheabilityUpdatedEvent is no longer used,
	removed all the traces of it. SetCacheability should not switch
	output caching on.

2008-10-15  Marek Habersack  <[email protected]>

	* OutputCacheModule.cs: do not take any action if Response returns
	null from GetCachedResponse.

2008-10-15  Marek Habersack  <[email protected]>

	* Page.cs: Response caching is switched on only when output
	caching is configured for this page instance. Fixes bug #435549.

svn path=/trunk/mcs/; revision=115861
2008-10-15 12:31:16 +00:00
Marek Habersack a85f32bb17 Remove some code noise
svn path=/trunk/mcs/; revision=114370
2008-09-29 06:54:34 +00:00
Marek Habersack 45c4d688ac 2008-09-29 Marek Habersack <[email protected]>
* OutputCacheModule.cs: invalidate cache entries when the
	corresponding source file (.as?x) is recompiled by hooking up to
	System.Web.Compilation.BuildManager's build cache entry removal
	event. Fixes bug #429926

2008-09-29  Marek Habersack  <[email protected]>

	* BuildManagerRemoveEntryEventHandler.cs: added

	* BuildManager.cs: added a static event to notify interested
	parties when an entry is removed from the buildCache. Fixes bug
	#429926.

svn path=/trunk/mcs/; revision=114369
2008-09-29 06:53:14 +00:00
Juraj Skripsky 063fbcfbbd 2008-09-26 Juraj Skripsky <[email protected]>
* OutputCacheModule.cs: Consistently use InternalCache for
	CachedRawResponse items and Cache for CachedVaryBy items.
	Partial fix for bug #429926.

svn path=/trunk/mcs/; revision=114189
2008-09-26 14:56:10 +00:00
Kornél Pál 25c6680c8e Don't add Date header in ASP.NET. Fixes bug #363404.
svn path=/trunk/mcs/; revision=96613
2008-02-26 09:52:01 +00:00
Marek Habersack 0b80ac0b50 2007-06-20 Marek Habersack <[email protected]>
* OutputCacheModule.cs: use Context.InternalCache.

	* Cache.cs: 2.0 profile uses generic containers to keep the cache
	entries.
	Gotten rid of the InsertPrivate and InsertInternal methods. The
	latter was moved to one of the Insert overloads.
	Private entries are no longer handled specifically, because the
	internal cache is now kept in a separate object.

2007-06-20  Marek Habersack  <[email protected]>

	* AppResourcesCompiler.cs: use HttpRuntime.InternalCache to keep
	private entries.
	* CachingCompiler.cs: as above
	* AspGenerator.cs: as above

2007-06-20  Marek Habersack  <[email protected]>

	* DataSourceCacheManager.cs: use HttpContext.Current.InternalCache
	to keep private entries.
	* XmlDataSource.cs: as above

2007-06-20  Marek Habersack  <[email protected]>

	* SessionInProcHandler.cs: use HttpRuntime.InternalCache to keep
	private entries.

2007-06-20  Marek Habersack  <[email protected]>

	* SessionInProcHandler.cs: use HttpRuntime.InternalCache to keep
	the internal entries.

2007-06-20  Marek Habersack  <[email protected]>

	* BasePartialCachingControl.cs: use HttpRuntime.InternalCache to
	keep the private entries.

2007-06-20  Marek Habersack  <[email protected]>

	* HttpRuntime.cs: added new internal property, InternalCache, to
	keep all the internal cache entries instead of mixing them with
	the public cache ones.
	Do not invoke Cache.InvokePrivateCallbacks - this method no longer
	exists.

	* HttpResponse.cs: private entries are now kept in
	Context.InternalCache.

	* HttpContext.cs: added new internal property, InternalCache,
	which returns the HttpRuntime.InternalCache value.

Fixes bug #81690


svn path=/trunk/mcs/; revision=80321
2007-06-20 15:42:36 +00:00
Robert Jordan 15d8fd2d68 2006-03-18 Robert Jordan <[email protected]>
* OutputCacheModule.cs: invoke the validation callbacks of
	HttpCachePolicy. Fixes bug #77825.


svn path=/trunk/mcs/; revision=58153
2006-03-19 15:15:15 +00:00
Eyal Alalouf 986fb9c7d2 Fixes for Grasshopper compilation
svn path=/trunk/mcs/; revision=49693
2005-09-08 12:56:45 +00:00
Miguel de Icaza 54079f764a Commit of changes to core files, on behalf of the team
svn path=/trunk/mcs/; revision=48944
2005-08-26 22:58:48 +00:00
Duncan Mak d1c09fcc67 Add licensing info
svn path=/trunk/mcs/; revision=30345
2004-06-24 20:59:43 +00:00
Patrik Torstensson a596fe4999 2004-05-27 Patrik Torstensson <[email protected]>
* CacheEntry.cs,CacheExpires.cs,ExpiresBucket.cs,
	  Cache.cs : Fixed deadlock issues, fixed
	  items not correctly being flushed, fixed update
	  of item when expiration has been updated more
	  than 1 min (placed in wrong bucket),
	  fixed deadlock during cache callback when item
	  is removed due to expiriation.

	  Rewrite of locking handling in Cache class, leading
	  to better performance and less bugs.

	  This rewrite is due to a number of bugs found
	  in the output caching during load (leading to memory
	  leaks and deadlocks)

svn path=/trunk/mcs/; revision=28254
2004-05-27 12:15:13 +00:00
Jackson Harper 80f98b141b * Cache.cs: Close entries that are removed.
* CacheDependency.cs: Use FileSystemWatcher instead of custom
	Watcher for file dependencies.
	* OutputCacheModule.cs: Make the varyby objects dependent on the
	cached page.

svn path=/trunk/mcs/; revision=22924
2004-02-09 22:00:05 +00:00
Jackson Harper 27e2382a32 * OutputCacheModule.cs: We can use file dependancies now.
svn path=/trunk/mcs/; revision=22723
2004-02-02 22:32:36 +00:00
Jackson Harper ed9721a025 * Cache.cs: Return null when items are expired but have not been
removed yet.
	* OutputCacheModule.cs: Handle sliding expirations. Remove hacks
	checking if the item is expired, the cache no longer returns
	expired items.

svn path=/trunk/mcs/; revision=22103
2004-01-15 06:42:06 +00:00
Jackson Harper 8502e8ea49 * OutputCacheModule.cs: Remove varyby objects when there are no
more raw responses that belong to them.
	* CachedRawResponse.cs: Keep a reference to the VaryBy object that
	this response belongs to this is so the varyby can be cleaned up.
	* CachedVaryBy.cs: Keep a reference to the keys that belong to the
	varyby and a reference to the varyby's key.

svn path=/trunk/mcs/; revision=21966
2004-01-12 03:01:48 +00:00
Jackson Harper 1c703c45ac * OutputCacheModule.cs: Remove varyby objects when there are no
more raw responses that belong to them.
	* CachedRawResponse.cs: Keep a reference to the VaryBy object that
	this response belongs to this is so the varyby can be cleaned up.
	* CachedVaryBy.cs: Keep a reference to the keys that belong to the
	varyby and a reference to the varyby's key.

svn path=/trunk/mcs/; revision=21965
2004-01-12 02:58:21 +00:00
Jackson Harper fe11fbe774 * OutputCacheModule.cs: Dont cache items when trace is enabled.
svn path=/trunk/mcs/; revision=21702
2004-01-05 05:21:09 +00:00
Jackson Harper d3895b8c75 * OutputCacheModule.cs: Update the date header value.
* CachedRawResponse.cs: Expose a ref to the date header, so it can
	be easily set/updated. Remove unused methods and vars.

svn path=/trunk/mcs/; revision=21700
2004-01-05 04:10:55 +00:00
Jackson Harper 46d769c5a8 * OutputCacheModule.cs: Make raw repsonse entries dependent on
their varyby param entries.

svn path=/trunk/mcs/; revision=21694
2004-01-05 01:54:54 +00:00
Jackson Harper c8574de2f2 * OutputCacheModule.cs: VaryBy keys now need the HttpContext not just the request.
* CachedVaryBy.cs: Handle vary by headers, and vary by custom.

svn path=/trunk/mcs/; revision=21686
2004-01-04 21:51:45 +00:00
Jackson Harper bc46837166 * OutputCacheModule.cs: Only cache a page if it has a 200 status
code. Fix tabbing.
	* CachedVaryBy.cs: Give raw response keys a name, use the
	httpmethod in the key, and delimit items with \n so it is easier
	to read when debugging.

svn path=/trunk/mcs/; revision=20506
2003-11-26 22:23:28 +00:00
Jackson Harper 1889af35df * OutputCacheModule.cs: Store a CachedVaryBy object for each
cached page. Then store a CachedRawResponse for each combination
	of varried parameters for a page.
	* CachedRawResponse.cs: Do not need to store param values anymore
	those are stored in the CachedVaryBy now. Get the content length
	so we dont send back the entire buffer.
	* CachedVaryBy.cs: New file - holds the varyby data for a page,
	and a method to generate a key based on params. Right now this
	only works with VaryByParams. TODO: support VaryByHeaders and
	VaryByCustom.

svn path=/trunk/mcs/; revision=20333
2003-11-22 06:53:51 +00:00
Jackson Harper 54d9ed0618 * Cache.cs: New method so non public cache items can be added.
* CachedRawResponse.cs: New file - A snapshot of a response that
	is stored in the cache and can be used to create a new response.
	* OutputCacheModule.cs: Module for inserting and retrieving
	responses from the cache.

svn path=/trunk/mcs/; revision=20272
2003-11-20 11:50:24 +00:00