コード例 #1
0
        /// <summary>
        /// 今日发帖总数
        /// </summary>
        /// <returns></returns>
        public int BBSTodayCount()
        {
            string SysName = CacheName.BBSTodayCount.ToString();
            string count=null;
            object value=null;
            if (SysCache.Contains(SysName))
            {
                value = SysCache.Get(SysName);
            }
            if (value != null)
                return int.Parse(value.ToString());

            bizBBSMain b = new bizBBSMain();
            bizBBSDE bd = new bizBBSDE();
            count = (b.CountByToday()+bd.CountByToday()).ToString();
            SysCache.Add(SysName, count, new AbsoluteTime(DateTime.Now.AddMinutes(10)));
            return int.Parse(count);
        }