public ActionResult Index(int page = 1) { var photos = new PhotosViewModel(); photos.SStore = this.MyStore; var m = FileManagerService.GetImagesByStoreId(MyStore.Id, page, 24); photos.SFileManagers = new PagedList <FileManager>(m.items, m.page - 1, m.pageSize, m.totalItemCount); return(View(photos)); }
protected List <FileManager> GetStoreImages() { String key = String.Format("GetStoreImages-{0}", StoreId); _settingStoreCache.IsCacheEnable = true; List <FileManager> items = null; _imagesStoreCache.TryGet(key, out items); if (items == null) { var itemsAsyn = FileManagerService.GetImagesByStoreId(StoreId, true); _imagesStoreCache.Set(key, itemsAsyn, MemoryCacheHelper.CacheAbsoluteExpirationPolicy(ProjectAppSettings.CacheLongSeconds)); } return(items); }