OutputCacheSection.SendCacheControlHeader Propriété
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Obtient ou définit une valeur indiquant si l’en-tête cache-control:private est envoyé par le module de cache de sortie par défaut.
public:
property bool SendCacheControlHeader { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("sendCacheControlHeader", DefaultValue=true)]
public bool SendCacheControlHeader { get; set; }
[<System.Configuration.ConfigurationProperty("sendCacheControlHeader", DefaultValue=true)>]
member this.SendCacheControlHeader : bool with get, set
Public Property SendCacheControlHeader As Boolean
Valeur de propriété
true si l’envoi de l’en-tête cache-control:private est activé ; sinon, false. La valeur par défaut est true.
- Attributs
Exemples
L’exemple de code suivant montre comment utiliser la SendCacheControlHeader propriété.
// Get the current SendCacheControlHeader.
Boolean sendCacheControlHeaderValue =
outputCacheSection.SendCacheControlHeader;
// Set the SendCacheControlHeader.
outputCacheSection.SendCacheControlHeader = false;
' Get the current SendCacheControlHeader.
Dim sendCacheControlHeaderValue As [Boolean] = _
outputCacheSection.SendCacheControlHeader
' Set the SendCacheControlHeader.
outputCacheSection.SendCacheControlHeader = False
Remarques
S’applique SendCacheControlHeader au contenu sans mise en cache de sortie spécifiée. Lorsqu’il est défini falsesur , l’en-tête cache-control:private n’est pas envoyé par défaut.
Note
Ce paramètre permet au contenu d’être mis en cache sur le client par défaut.