Exemple #1
0
            public static List <FormInfo> GetCacheFormInfoList(int siteId)
            {
                var cacheKey = GetCacheKey(siteId);
                var retval   = CacheUtils.Get <List <FormInfo> >(cacheKey);

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

                lock (LockObject)
                {
                    retval = CacheUtils.Get <List <FormInfo> >(cacheKey);
                    if (retval == null)
                    {
                        retval = FormDao.GetFormInfoList(siteId);

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

                return(retval);
            }