public static DataTable GetTable(SqlCommand command) { CacheTable item = GetCacheItem(GetIndexString(command)) as CacheTable; if (item != null) { return(item.Table); } else { return(null); } }
public static void AddTable(SqlCommand command, string tableNames, int expireTime, DataTable table, int organizationID) { if (!GlobalCacheEnabled) { return; } CacheTable item = new CacheTable(); item.ExpiresOn = DateTime.Now.AddSeconds(expireTime); item.TableNames = GetTableNameList(tableNames); item.Table = table; item.OrganizationID = organizationID; HttpContext.Current.Application[GetIndexString(command)] = item; }