public Forum GetForum(int portalId, int moduleId, int forumId, bool ignoreCache) { var cachekey = string.Format(forumInfoCacheKey, portalId, moduleId, forumId); var forum = DataCache.CacheRetrieve(cachekey) as Forum; if (forum == null || ignoreCache) { using (var dr = ForumsDB.Forums_Get(portalId, moduleId, forumId)) { while (dr.Read()) { forum = FillForum(dr); } dr.Close(); } if (forum != null) { if (forum.HasProperties) { var propC = new PropertiesController(); forum.Properties = propC.ListProperties(portalId, 1, forumId); } } DataCache.CacheStore(cachekey, forum); } return(forum); }
public Forum GetForum(int portalId, int moduleId, int forumId, bool ignoreCache) { var cachekey = string.Format(forumInfoCacheKey, portalId, moduleId, forumId); var forum = DataCache.CacheRetrieve(cachekey) as Forum; if (forum == null || ignoreCache) { using (var dr = ForumsDB.Forums_Get(portalId, moduleId, forumId)) { while (dr.Read()) { forum = FillForum(dr); } dr.Close(); } if (forum != null) { if (forum.HasProperties) { var propC = new PropertiesController(); forum.Properties = propC.ListProperties(portalId, 1, forumId); } } DataCache.CacheStore(cachekey, forum); } return forum; }