public void SetHomeSelloutGoodses(IEnumerable <GoodsAlias> goodses) { goodses.CheckNotNull(nameof(goodses)); _cache.Add(CacheKeySupplier.HomeSelloutGoodsesCacheKey(), goodses); }
public IEnumerable <GoodsAlias> GetHomeSelloutGoodses() { var goodses = _cache.Get(CacheKeySupplier.HomeSelloutGoodsesCacheKey()) as IEnumerable <GoodsAlias>; return(goodses); }
/// <summary> /// 更新缓存的用户模型 /// </summary> /// <param name="userId"></param> /// <param name="userInfo"></param> public void UpdateUserInfo(string userId, UserViewModel userInfo) { _cache.Update(CacheKeySupplier.UserModelCacheKey(userId), u => userInfo); }