SystemWebCachingSectionGroup.Cache 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 la section cache
contenue dans la configuration.
public:
property System::Web::Configuration::CacheSection ^ Cache { System::Web::Configuration::CacheSection ^ get(); };
[System.Configuration.ConfigurationProperty("cache")]
public System.Web.Configuration.CacheSection Cache { get; }
[<System.Configuration.ConfigurationProperty("cache")>]
member this.Cache : System.Web.Configuration.CacheSection
Public ReadOnly Property Cache As CacheSection
Valeur de propriété
Objet CacheSection.
- Attributs
Exemples
L’exemple de code suivant montre comment obtenir l’objet CacheSection à partir du fichier de configuration d’une application web existante.
// Get the <cache> section.
CacheSection cache =
cachingSectionGroup.Cache;
// Display one of its properties.
msg = String.Format(
"Cache disable expiration: {0}\n",
cache.DisableExpiration);
Console.Write(msg);
' Get the <cache> section.
Dim cache As CacheSection = _
cachingSectionGroup.Cache
' Display one of its properties.
msg = String.Format( _
"Cache disable expiration: {0}" + _
ControlChars.Lf, cache.DisableExpiration)
Console.Write(msg)
Remarques
L’objet CacheSection fait référence à la section cache
du fichier de configuration. Vous pouvez utiliser la CacheSection classe pour modifier la cache
section par programmation.
S’applique à
Voir aussi
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour