Ejemplo n.º 1
0
 /// <summary>
 /// 向缓存中写入指定竞赛题目列表信息
 /// </summary>
 /// <param name="cid">竞赛ID</param>
 /// <param name="list">竞赛题目列表信息</param>
 public static void SetContestProblemSetCache(Int32 cid, List <ProblemEntity> list)
 {
     if (list != null)
     {
         CacheManager.Set(GetContestProblemSetCacheKey(cid), list, CONTEST_PROBLEM_SET_CACHE_TIME);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 向缓存中写入题目类别种类信息
 /// </summary>
 /// <param name="list">题目类别种类信息</param>
 public static void SetProblemCategoryListCache(List <ProblemCategoryEntity> list)
 {
     if (list != null)
     {
         CacheManager.Set(PROBLEM_CATEGORY_LIST_CACHE_KEY, list);
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 向缓存中写入指定主题信息
 /// </summary>
 /// <param name="topic">指定主题信息</param>
 public static void SetForumTopicCache(ForumTopicEntity topic)
 {
     if (topic != null)
     {
         CacheManager.Set(GetForumTopicCacheKey(topic.TopicID), topic);
     }
 }
Ejemplo n.º 4
0
 /// <summary>
 /// 向缓存中写入指定页面信息
 /// </summary>
 /// <param name="topicpage">指定页面信息</param>
 public static void SetTopicPageCache(TopicPageEntity topicpage)
 {
     if (topicpage != null)
     {
         CacheManager.Set(GetTopicPageCacheKey(topicpage.PageName), topicpage);
     }
 }
Ejemplo n.º 5
0
 /// <summary>
 /// 向缓存中写入指定帖子信息
 /// </summary>
 /// <param name="Post">指定帖子信息</param>
 public static void SetForumPostCache(ForumPostEntity post)
 {
     if (post != null)
     {
         CacheManager.Set(GetForumPostCacheKey(post.PostID), post);
     }
 }
Ejemplo n.º 6
0
 /// <summary>
 /// 向缓存中写入指定竞赛题目信息
 /// </summary>
 /// <param name="cid">竞赛ID</param>
 /// <param name="pid">题目ID</param>
 /// <param name="problem">竞赛题目信息</param>
 public static void SetContestProblemCache(Int32 cid, Int32 pid, ProblemEntity problem)
 {
     if (problem != null)
     {
         CacheManager.Set(GetContestProblemCacheKey(cid, pid), problem, CONTEST_PROBLEM_CACHE_TIME);
     }
 }
Ejemplo n.º 7
0
 /// <summary>
 /// 向缓存中写入最近比赛信息
 /// </summary>
 /// <param name="recentContest">最近比赛信息</param>
 public static void SetRecentContestCache(String recentContest)
 {
     if (!String.IsNullOrEmpty(recentContest))
     {
         CacheManager.Set(RECENTCONTEST_CACHE_KEY, recentContest);
     }
 }
Ejemplo n.º 8
0
 /// <summary>
 /// 向缓存中写入指定竞赛排名
 /// </summary>
 /// <param name="contestID">竞赛ID</param>
 /// <param name="rank">指定竞赛排名</param>
 public static void SetContestRankCache(Int32 contestID, List <RankItem> rank)
 {
     if (rank != null)
     {
         CacheManager.Set(GetContestRankCacheKey(contestID), rank, CONTEST_RANK_CACHE_TIME);
     }
 }
Ejemplo n.º 9
0
 /// <summary>
 /// 向缓存中写入指定题目列表信息
 /// </summary>
 /// <param name="pageIndex">页面索引</param>
 /// <param name="list">题目列表信息</param>
 public static void SetProblemSetCache(Int32 pageIndex, List <ProblemEntity> list)
 {
     if (list != null)
     {
         CacheManager.Set(GetProblemSetCacheKey(pageIndex), list, PROBLEM_SET_CACHE_TIME);
     }
 }
Ejemplo n.º 10
0
 /// <summary>
 /// 向缓存中写入指定题目信息
 /// </summary>
 /// <param name="problem">指定题目信息</param>
 public static void SetProblemCache(ProblemEntity problem)
 {
     if (problem != null)
     {
         CacheManager.Set(GetProblemCacheKey(problem.ProblemID), problem, PROBLEM_CACHE_TIME);
     }
 }
Ejemplo n.º 11
0
 /// <summary>
 /// 向缓存中写入指定竞赛信息
 /// </summary>
 /// <param name="contest">指定竞赛信息</param>
 public static void SetContestCache(ContestEntity contest)
 {
     if (contest != null)
     {
         CacheManager.Set(GetContestCacheKey(contest.ContestID), contest);
     }
 }
Ejemplo n.º 12
0
 /// <summary>
 /// 向缓存中写入资源信息
 /// </summary>
 /// <param name="list">资源信息</param>
 public static void SetResourceListCache(List <ResourceEntity> list)
 {
     if (list != null)
     {
         CacheManager.Set(RESOURCE_LIST_CACHE_KEY, list);
     }
 }
Ejemplo n.º 13
0
 /// <summary>
 /// 向缓存中写入指定公告信息
 /// </summary>
 /// <param name="news">指定公告信息</param>
 public static void SetNewsCache(NewsEntity news)
 {
     if (news != null)
     {
         CacheManager.Set(GetNewsCacheKey(news.AnnounceID), news);
     }
 }
Ejemplo n.º 14
0
 /// <summary>
 /// 向缓存中写入指定竞赛用户列表信息
 /// </summary>
 /// <param name="cid">竞赛ID</param>
 /// <param name="dict">竞赛用户列表信息</param>
 public static void SetContestUserListCache(Int32 cid, Dictionary <String, ContestUserEntity> dict)
 {
     if (dict != null)
     {
         CacheManager.Set(GetContestUserListCacheKey(cid), dict);
     }
 }
Ejemplo n.º 15
0
 /// <summary>
 /// 向缓存中写入指定竞赛题目列表
 /// </summary>
 /// <param name="cid">竞赛ID</param>
 /// <param name="list">竞赛题目列表</param>
 public static void SetContestProblemListCache(Int32 cid, List <ContestProblemEntity> list)
 {
     if (list != null)
     {
         CacheManager.Set(GetContestProblemListCacheKey(cid), list);
     }
 }
Ejemplo n.º 16
0
 /// <summary>
 /// 向缓存中写入最近公告信息
 /// </summary>
 /// <param name="list">最近公告信息</param>
 public static void SetLastestNewsListCache(List <NewsEntity> list)
 {
     if (list != null)
     {
         CacheManager.Set(NEWS_LASTLIST_CACHE_KEY, list);
     }
 }
Ejemplo n.º 17
0
 /// <summary>
 /// 向缓存中写入竞赛总数
 /// </summary>
 /// <param name="passed">是否已过去的竞赛</param>
 /// <param name="count">竞赛总数</param>
 public static void SetContestListCountCache(Boolean passed, Int32 count)
 {
     CacheManager.Set(GetContestListCountCacheKey(passed), count, CONTEST_COUNT_CACHE_TIME);
 }
Ejemplo n.º 18
0
 /// <summary>
 /// 向缓存中写入提交总数
 /// </summary>
 /// <param name="cid">竞赛ID</param>
 /// <param name="count">提交总数</param>
 public static void SetSolutionCountCache(Int32 cid, Int32 count)
 {
     CacheManager.Set(GetSolutionCountCacheKey(cid), count, SOLUTION_COUNT_CACHE_TIME);
 }
Ejemplo n.º 19
0
 /// <summary>
 /// 向缓存中写入用户未读邮件总数
 /// </summary>
 /// <param name="userName">用户名</param>
 /// <param name="count">用户未读邮件总数</param>
 public static void SetUserUnReadMailCountCache(String userName, Int32 count)
 {
     CacheManager.Set(GetUserUnReadMailCountCacheKey(userName), count, USERUNREADMAIL_COUNT_CACHE_TIME);
 }
Ejemplo n.º 20
0
 /// <summary>
 /// 向缓存中写入公告总数
 /// </summary>
 /// <param name="count">公告总数</param>
 public static void SetNewsCountCache(Int32 count)
 {
     CacheManager.Set(NEWS_COUNT_CACHE_KEY, count);
 }
Ejemplo n.º 21
0
 /// <summary>
 /// 向缓存中写入AC代码打包文件
 /// </summary>
 /// <param name="userName">用户名</param>
 /// <param name="file">AC代码打包文件</param>
 public static void SetAcceptedCodesCache(String userName, Byte[] file)
 {
     CacheManager.Set(GetAcceptedCodesKey(userName), file, ACCEPTED_CODES_CACHE_TIME);
 }
Ejemplo n.º 22
0
 /// <summary>
 /// 向缓存中写入题目总数
 /// </summary>
 /// <param name="count">题目总数</param>
 public static void SetProblemSetCountCache(Int32 count)
 {
     CacheManager.Set(PROBLEM_COUNT_CACHE_KEY, count);
 }
Ejemplo n.º 23
0
 /// <summary>
 /// 向缓存中写入主题总数
 /// </summary>
 /// <param name="type">主题类型</param>
 /// <param name="relativeID">相关ID</param>
 /// <param name="count">主题总数</param>
 public static void SetForumTopicCountCache(ForumTopicType type, Int32 relativeID, Int32 count)
 {
     CacheManager.Set(GetForumTopicCountCacheKey(type, relativeID), count, FORUM_TOPIC_COUNT_CACHE_TIME);
 }
Ejemplo n.º 24
0
 /// <summary>
 /// 向缓存中写入题目ID最大值
 /// </summary>
 /// <param name="max">题目ID最大值</param>
 public static void SetProblemIDMaxCache(Int32 max)
 {
     CacheManager.Set(PROBLEM_MAX_CACHE_KEY, max);
 }
Ejemplo n.º 25
0
 /// <summary>
 /// 向缓存中写入题目统计
 /// </summary>
 /// <param name="cid">竞赛ID</param>
 /// <param name="pid">题目ID</param>
 /// <returns>题目统计信息实体</returns>
 public static void SetProblemStatisticCache(Int32 cid, Int32 pid, ProblemStatistic statistic)
 {
     CacheManager.Set(GetProblemStatisticCacheKey(cid, pid), statistic, PROBLEMSTATISTIC_CACHE_TIME);
 }
Ejemplo n.º 26
0
 /// <summary>
 /// 向缓存中写入用户排名总数
 /// </summary>
 /// <param name="count">用户排名总数</param>
 public static void SetRanklistUserCountCache(Int32 count)
 {
     CacheManager.Set(RANKLIST_COUNT_CACHE_KEY, count);
 }
Ejemplo n.º 27
0
 /// <summary>
 /// 向缓存中写入竞赛题目统计列表
 /// </summary>
 /// <param name="cid">竞赛ID</param>
 /// <returns>竞赛题目统计列表</returns>
 public static void SetContestStatisticCache(Int32 cid, IDictionary <Int32, ContestProblemStatistic> statistic)
 {
     CacheManager.Set(GetContestStatisticCacheKey(cid), statistic, CONTESTSTATISTIC_CACHE_TIME);
 }
Ejemplo n.º 28
0
 /// <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);
 }
Ejemplo n.º 29
0
 /// <summary>
 /// 向缓存中写入题目ID列表
 /// </summary>
 /// <param name="userName">用户名</param>
 /// <param name="isUnsolved">是否非完成列表</param>
 /// <param name="list">题目ID列表</param>
 public static void SetProblemIDListCache(String userName, Boolean isUnsolved, List <Int32> list)
 {
     CacheManager.Set(GetProblemIDListCacheKey(userName, isUnsolved), list ?? new List <Int32>(), PROBLEMID_LIST_CACHE_TIME);
 }