bsp; {
return null;
}
protected virtual void OnBeforeAdd(string key)
{
}
public virtual void Add(string key, object value)
{
if (!this.CheckParameters(key)) return;
this.OnBeforeAdd(key);
HttpRuntime.Cache.Insert(
key,
value,
this.GetCacheDependency(key),
System.Web.Caching.Cache.NoAbsoluteExpiration,
System.Web.Caching.Cache.NoSlidingExpiration,
System.Web.Caching.CacheItemPriority.Default,
null);
}
public virtual object Get(string key)
{
if (!this.CheckParameters(key)) return null;
return HttpRuntime.Cache.Get(key);
}
public virtual void Remove(string key, bool useDependency)
{
if (!this.CheckParameters(key)) return;
HttpRuntime.Cache.Remove(key);
}
}
public class SqlDependencyWebCache : WebCacheBase
{
private string _connectionString;
priva