Ejemplo n.º 1
0
            public static Dictionary <string, int> GetDataCountsCache(int siteId)
            {
                var cacheKey = GetCacheKey(siteId);
                var retval   = CacheUtils.Get <Dictionary <string, int> >(cacheKey);

                if (retval != null)
                {
                    return(retval);
                }

                lock (LockObject)
                {
                    retval = CacheUtils.Get <Dictionary <string, int> >(cacheKey);
                    if (retval == null)
                    {
                        retval = DataDao.GetDataCounts(siteId);

                        CacheUtils.InsertHours(cacheKey, retval, 1);
                    }
                }

                return(retval);
            }