Esempio n. 1
0
 public IEnumerable <Question> All()
 {
     if (!CHCache.Contains(ALLQUESTIONSTRING))
     {
         CHCache.Add(ALLQUESTIONSTRING, QuestionDao.AllQuestion(), TimeSpan.FromMinutes(3));
     }
     return(CHCache.Get <IEnumerable <Question> >(ALLQUESTIONSTRING));
 }
Esempio n. 2
0
 public IEnumerable <Wiki> List()
 {
     if (!CHCache.Contains(WIKICACHE))
     {
         CHCache.Add(WIKICACHE, WikiDao.List());
     }
     return(CHCache.Get <IEnumerable <Wiki> >(WIKICACHE));
 }
Esempio n. 3
0
 public IEnumerable <Group> GroupList()
 {
     if (!CHCache.Contains(GROUPLISTSTRING))
     {
         var gl = GroupDao.GroupList();
         CHCache.Add(GROUPLISTSTRING, gl, TimeSpan.FromMinutes(3));
     }
     return(CHCache.Get <IEnumerable <Group> >(GROUPLISTSTRING));
 }
Esempio n. 4
0
        public IEnumerable <Profile> RankList(int n)
        {
            string key = "ranklist";

            if (!CHCache.Contains(key))
            {
                CHCache.Add(key, ProfileDao.RankList(n), TimeSpan.FromMinutes(3));
            }
            return(CHCache.Get <IEnumerable <Profile> >(key));
        }