/// <summary> /// 从缓存中删除最近公告信息 /// </summary> public static void RemoveLastestNewsListCache() { CacheManager.Remove(NEWS_LASTLIST_CACHE_KEY); }
/// <summary> /// 从缓存中删除公告总数 /// </summary> public static void RemoveNewsCountCache() { CacheManager.Remove(NEWS_COUNT_CACHE_KEY); }
/// <summary> /// 从缓存中读取最近公告信息 /// </summary> /// <returns>最近公告信息</returns> public static List <NewsEntity> GetLastestNewsListCache() { return(CacheManager.Get <List <NewsEntity> >(NEWS_LASTLIST_CACHE_KEY)); }
/// <summary> /// 向缓存中写入公告总数 /// </summary> /// <param name="count">公告总数</param> public static void SetNewsCountCache(Int32 count) { CacheManager.Set(NEWS_COUNT_CACHE_KEY, count); }
/// <summary> /// 从缓存中读取公告总数 /// </summary> /// <returns>公告总数</returns> public static Int32 GetNewsCountCache() { return(CacheManager.GetInt32(NEWS_COUNT_CACHE_KEY)); }
/// <summary> /// 从缓存中读取题目类别种类信息 /// </summary> /// <returns>题目类别种类信息</returns> public static List <ProblemCategoryEntity> GetProblemCategoryListCache() { return(CacheManager.Get <List <ProblemCategoryEntity> >(PROBLEM_CATEGORY_LIST_CACHE_KEY)); }
/// <summary> /// 从缓存中删除指定竞赛题目列表 /// </summary> /// <param name="cid">竞赛ID</param> public static void RemoveContestProblemListCache(Int32 cid) { CacheManager.Remove(GetContestProblemListCacheKey(cid)); }
/// <summary> /// 从缓存中读取用户排名总数 /// </summary> /// <returns>用户排名总数</returns> public static Int32 GetRanklistUserCountCache() { return(CacheManager.GetInt32(RANKLIST_COUNT_CACHE_KEY)); }
/// <summary> /// 从缓存中删除用户排名总数 /// </summary> public static void RemoveRanklistUserCountCache() { CacheManager.Remove(RANKLIST_COUNT_CACHE_KEY); }
/// <summary> /// 从缓存中删除用户TOP10列表 /// </summary> public static void RemoveUserTop10Cache() { CacheManager.Remove(USER_TOP10_CACHE_KEY); }
/// <summary> /// 向缓存中写入用户排名总数 /// </summary> /// <param name="count">用户排名总数</param> public static void SetRanklistUserCountCache(Int32 count) { CacheManager.Set(RANKLIST_COUNT_CACHE_KEY, count); }
/// <summary> /// 从缓存中读取用户TOP10列表 /// </summary> /// <returns>用户TOP10列表</returns> public static List <UserEntity> GetUserTop10Cache() { return(CacheManager.Get <List <UserEntity> >(USER_TOP10_CACHE_KEY)); }
/// <summary> /// 向缓存中写入用户TOP10列表 /// </summary> /// <param name="list">用户TOP10列表</param> public static void SetUserTop10Cache(List <UserEntity> list) { CacheManager.Set(USER_TOP10_CACHE_KEY, list ?? new List <UserEntity>(), USER_TOP10_CACHE_TIME); }
/// <summary> /// 从缓存中读取指定竞赛题目列表信息 /// </summary> /// <param name="cid">竞赛ID</param> /// <returns>竞赛题目列表信息</returns> public static List <ProblemEntity> GetContestProblemSetCache(Int32 cid) { return(CacheManager.Get <List <ProblemEntity> >(GetContestProblemSetCacheKey(cid))); }
/// <summary> /// 从缓存中读取指定公告信息 /// </summary> /// <param name="id">公告ID</param> /// <returns>指定公告信息</returns> public static NewsEntity GetNewsCache(Int32 id) { return(CacheManager.Get <NewsEntity>(GetNewsCacheKey(id))); }
/// <summary> /// 从缓存中读取指定页面信息 /// </summary> /// <param name="name">页面名称</param> /// <returns>指定页面信息</returns> public static TopicPageEntity GetTopicPageCache(String name) { return(CacheManager.Get <TopicPageEntity>(GetTopicPageCacheKey(name))); }
/// <summary> /// 从缓存中删除指定公告信息 /// </summary> public static void RemoveNewsCache(Int32 id) { CacheManager.Remove(GetNewsCacheKey(id)); }
/// <summary> /// 从缓存中删除指定页面信息 /// </summary> /// <param name="name">页面名称</param> public static void RemoveTopicPageCache(String name) { CacheManager.Remove(GetTopicPageCacheKey(name)); }
/// <summary> /// 从缓存中删除题目类别种类信息 /// </summary> public static void RemoveProblemCategoryListCache() { CacheManager.Remove(PROBLEM_CATEGORY_LIST_CACHE_KEY); }
/// <summary> /// 从缓存中读取指定竞赛题目信息 /// </summary> /// <param name="cid">竞赛ID</param> /// <param name="pid">题目ID</param> /// <returns>竞赛题目信息</returns> public static ProblemEntity GetContestProblemCache(Int32 cid, Int32 pid) { return(CacheManager.Get <ProblemEntity>(GetContestProblemCacheKey(cid, pid))); }