SystemWebCachingSectionGroup.Cache Vlastnost
Definice
Důležité
Některé informace platí pro předběžně vydaný produkt, který se může zásadně změnit, než ho výrobce nebo autor vydá. Microsoft neposkytuje žádné záruky, výslovné ani předpokládané, týkající se zde uváděných informací.
cache Získá oddíl obsažený v konfiguraci.
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
Hodnota vlastnosti
Objekt CacheSection
- Atributy
Příklady
Následující příklad kódu ukazuje, jak získat CacheSection objekt z konfiguračního souboru existující webové aplikace.
// 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)
Poznámky
Objekt CacheSection odkazuje na cache část konfiguračního souboru. Třídu můžete použít CacheSection k úpravě oddílu cache prostřednictvím kódu programu.