|
Este artículo proviene de un motor de traducción automática. Mueva el puntero sobre las frases del artículo para ver el texto original. Más información.
|
Traducción
Original
|
Cache (Clase)
Espacio de nombres: System.Web.Caching
Ensamblado: System.Web (en System.Web.dll)
El tipo Cache expone los siguientes miembros.
| Nombre | Descripción | |
|---|---|---|
![]() | Count | |
![]() | EffectivePercentagePhysicalMemoryLimit | |
![]() | EffectivePrivateBytesLimit | |
![]() | Item |
| Nombre | Descripción | |
|---|---|---|
![]() | Add | |
![]() | Equals(Object) | |
![]() | Get | |
![]() | GetEnumerator | |
![]() | GetHashCode | |
![]() | GetType | |
![]() | Insert(String, Object) | |
![]() | Insert(String, Object, CacheDependency) | |
![]() | Insert(String, Object, CacheDependency, DateTime, TimeSpan) | |
![]() | Insert(String, Object, CacheDependency, DateTime, TimeSpan, CacheItemUpdateCallback) | |
![]() | Insert(String, Object, CacheDependency, DateTime, TimeSpan, CacheItemPriority, CacheItemRemovedCallback) | |
![]() | Remove | |
![]() | ToString |
| Nombre | Descripción | |
|---|---|---|
![]() | AsParallel | |
![]() | AsQueryable | |
![]() | Cast<TResult> | |
![]() | OfType<TResult> |
| Nombre | Descripción | |
|---|---|---|
![]() ![]() | NoAbsoluteExpiration | |
![]() ![]() | NoSlidingExpiration |
| Nombre | Descripción | |
|---|---|---|
![]() ![]() | IEnumerable.GetEnumerator |
Nota |
|---|
| Topic | Location |
|---|---|
| Cómo: Agregar elementos a caché | Generar aplicaciones Web ASP .NET |
| Cómo: Eliminar elementos de la caché en ASP.NET | Generar aplicaciones Web ASP .NET |
| Cómo: Eliminar elementos de la caché en ASP.NET | Generar aplicaciones Web ASP .NET en Visual Studio |
| Cómo: Agregar elementos a caché | Generar aplicaciones Web ASP .NET en Visual Studio |
<html> <Script runat=server language="C#"> static bool itemRemoved = false; static CacheItemRemovedReason reason; CacheItemRemovedCallback onRemove = null; public void RemovedCallback(String k, Object v, CacheItemRemovedReason r){ itemRemoved = true; reason = r; } public void AddItemToCache(Object sender, EventArgs e) { itemRemoved = false; onRemove = new CacheItemRemovedCallback(this.RemovedCallback); if (Cache["Key1"] == null) Cache.Add("Key1", "Value 1", null, DateTime.Now.AddSeconds(60), Cache.NoSlidingExpiration, CacheItemPriority.High, onRemove); } public void RemoveItemFromCache(Object sender, EventArgs e) { if(Cache["Key1"] != null) Cache.Remove("Key1"); } </Script> <body> <Form runat="server"> <input type=submit OnServerClick="AddItemToCache" value="Add Item To Cache" runat="server"/> <input type=submit OnServerClick="RemoveItemFromCache" value="Remove Item From Cache" runat="server"/> </Form> <% if (itemRemoved) { Response.Write("RemovedCallback event raised."); Response.Write("<BR>"); Response.Write("Reason: <B>" + reason.ToString() + "</B>"); } else { Response.Write("Value of cache key: <B>" + Server.HtmlEncode(Cache["Key1"] as string) + "</B>"); } %> </body> </html>
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (no se admite el rol Server Core), Windows Server 2008 R2 (se admite el rol Server Core con SP1 o versiones posteriores; no se admite Itanium)
.NET Framework no admite todas las versiones de todas las plataformas. Para obtener una lista de las versiones compatibles, vea Requisitos de sistema de .NET Framework.
