/// <summary> /// 获取类目列表 /// </summary> /// <returns></returns> public virtual IReadOnlyList <ProductCategory> GetCategoryList() { return(CategoryListCache.GetOrCreate(0, () => UnitOfWork.ReadData <ProductCategory, List <ProductCategory> >(r => { return r.GetMany(c => !c.Deleted).ToList(); }), CategoryCacheTime)); }
/// <summary> /// 清理缓存 /// </summary> public virtual void ClearCache() { CategoryCache.Clear(); CategoryListCache.Clear(); PropertyListCache.Clear(); }