public IEnumerable <Question> All() { if (!CHCache.Contains(ALLQUESTIONSTRING)) { CHCache.Add(ALLQUESTIONSTRING, QuestionDao.AllQuestion(), TimeSpan.FromMinutes(3)); } return(CHCache.Get <IEnumerable <Question> >(ALLQUESTIONSTRING)); }
public IEnumerable <Wiki> List() { if (!CHCache.Contains(WIKICACHE)) { CHCache.Add(WIKICACHE, WikiDao.List()); } return(CHCache.Get <IEnumerable <Wiki> >(WIKICACHE)); }
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)); }
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)); }