Example #1
0
        public void SetHomeSelloutGoodses(IEnumerable <GoodsAlias> goodses)
        {
            goodses.CheckNotNull(nameof(goodses));

            _cache.Add(CacheKeySupplier.HomeSelloutGoodsesCacheKey(), goodses);
        }
Example #2
0
        public IEnumerable <GoodsAlias> GetHomeSelloutGoodses()
        {
            var goodses = _cache.Get(CacheKeySupplier.HomeSelloutGoodsesCacheKey()) as IEnumerable <GoodsAlias>;

            return(goodses);
        }
Example #3
0
 /// <summary>
 /// 更新缓存的用户模型
 /// </summary>
 /// <param name="userId"></param>
 /// <param name="userInfo"></param>
 public void UpdateUserInfo(string userId, UserViewModel userInfo)
 {
     _cache.Update(CacheKeySupplier.UserModelCacheKey(userId), u => userInfo);
 }