private static Dictionary <int, Dictionary <int, TemplateInfo> > GetCacheDictionary() { var dictionary = DataCacheManager.Get <Dictionary <int, Dictionary <int, TemplateInfo> > >(CacheKey); if (dictionary == null) { dictionary = new Dictionary <int, Dictionary <int, TemplateInfo> >(); DataCacheManager.InsertHours(CacheKey, dictionary, 24); } return(dictionary); }
private static Dictionary <int, Dictionary <int, SpecialInfo> > GetCacheDictionary() { var dictionary = DataCacheManager.Get <Dictionary <int, Dictionary <int, SpecialInfo> > >(CacheKey); if (dictionary != null) { return(dictionary); } dictionary = new Dictionary <int, Dictionary <int, SpecialInfo> >(); DataCacheManager.InsertHours(CacheKey, dictionary, 24); return(dictionary); }
private static Dictionary <string, List <TableColumn> > GetAllDictionary() { var allDict = DataCacheManager.Get <Dictionary <string, List <TableColumn> > >(CacheKey); if (allDict != null) { return(allDict); } allDict = new Dictionary <string, List <TableColumn> >(); DataCacheManager.InsertHours(CacheKey, allDict, 24); return(allDict); }
public static Dictionary <int, ContentInfo> GetContentDict(int channelId) { lock (LockObject) { var cacheKey = GetCacheKey(channelId); var dict = DataCacheManager.Get <Dictionary <int, ContentInfo> >(cacheKey); if (dict == null) { dict = new Dictionary <int, ContentInfo>(); DataCacheManager.InsertHours(cacheKey, dict, 12); } return(dict); } }