Many HTTP cache related directives have a hierarchy of restrictiveness. This means that for a given mechanism (say cacheability), a set of options exists that ranges from permissive options (cache this response anywhere) to restrictive options (only cache this response on the client, not on a shared cache or never cache this response at all). The ASP+ output cache will always try to preserve the most restrictive setting for a given mechanism.
For example, if a pagelet control sets Cache-Control: private
, restricting the item’s cacheability only to clients, another pagelet associated with the first will not be able to make the setting more permissive (Cache-Control: public
). Attempts to use the cache API to later change this option in this manner will fail. If a subsequent pagelet enables a more restrictive setting, the cache will honor that.
Note All methods that preserve a hierarchy of restrictiveness are so noted in the documentation for that method. This will also be noted by the Restrict modifier on the method detail description.
See Also
ASP+ Output Cache | Preserving Restrictions | System.Web Namespace | HttpCachePolicy Class |