The OutputCacheProfile class provides a way to programmatically access and modify the add element of the outputCacheProfiles section in the caching section of a configuration file.

The OutputCacheProfile object centralizes frequently used configuration settings such as dependencies, cache location, and cache expiration time, eliminating the need to specify them on every page.

The OutputCacheProfile can be applied to a page using the CacheProfile attribute of the directive.

Note

The directive can override all the settings contained by an OutputCacheProfile object except for the Enabled attribute. This is to enable or disable the OutputCacheProfile without having to modify the directives in all the pages that might have overridden it.

The CacheDependency class monitors the dependencies so that when any cached item changes, the cached item will be automatically removed.