p; return cmd;
}
private void UpdateCacheDependency(string key)
{
SqlCommand cmd = this.GetUpdateCommand(key);
using (cmd.Connection)
{
cmd.Connection.Open();
cmd.Prepare();
cmd.ExecuteNonQuery();
}
}
protected override void OnBeforeAdd(string key)
{
this.UpdateCacheDependency(key);
}
protected override CacheDependency GetCacheDependency(string key)
{
SqlCommand cmd = this.GetSelectCommand(key);
SqlCacheDependency sqlCacheDependency = new SqlCacheDependency(cmd);
using (cmd.Connection)
{
cmd.Connection.Open();
cmd.Prepare();
cmd.ExecuteNonQuery();
}
return sqlCacheDependency;
}
public SqlDependencyWebCache(string connectionString)
{
this._connectionString = connectionString;
}
public override void Remove(strin