Using system.web; using system.data;
Namespace sc {///
private void SetCache (string setname, DataTable newvalue) {System.Web.HttpContext.Current.Application.Lock (); System.Web.HttpContext.Current.Application [setname] = newvalue; System.Web.HttpContext.Current.Application. Unlock ();
} Public void MakeCacheEmpty () // empty the cache {System.Web.HttpContext.Current.Application.Lock (); System.Web.HttpContext.Current.Application.Remove (name); System.Web.HttpContext.Current.Application. Unlock ();
}
Public String Name // Property: Name {set {name = value;}}
Public DataTable value // Property: Cache value {return (data) system.Web.httpContext.current.Application [name];} set {if (name! = "") {strValue = value; setCache (Name, Strvalue Else {}}}
} Public bool checkcache () // Check the cache {bool boolcheck = false; if (System.Web.httpContext.current.Application [name]! = Null) {boolcheck = true;} Return BoolCheck;}
}