Пример #1
0
        public WebContentEntity GetForm(string keyValue)
        {
            cacheKey = cacheKey + "2_" + keyValue;//拼接有参key值
            var cacheEntity = cache.GetCache <WebContentEntity>(cacheKey);

            if (cacheEntity == null)
            {
                cacheEntity = service.FindEntity(keyValue);
                cache.WriteCache <WebContentEntity>(cacheEntity, cacheKey, "UserCacheDependency", "Web_Content");
            }
            return(cacheEntity);
        }