Ejemplo n.º 1
0
        public async Task <CatalogIndexViewModel> GetCatalogItems(int pageIndex, int itemsPage, int?brandID, int?typeId, string username, int recommendationsInPage)
        {
            string cacheKey = String.Format(_itemsKeyTemplate, pageIndex, itemsPage, brandID, typeId, username);

            return(await _cache.GetOrCreateAsync(cacheKey, async entry =>
            {
                entry.SlidingExpiration = _defaultCacheDuration;
                return await _catalogService.GetCatalogItems(pageIndex, itemsPage, brandID, typeId, username, recommendationsInPage);
            }));
        }
Ejemplo n.º 2
0
        public async Task <CatalogIndexViewModel> GetCatalogItems(int pageIndex, int itemsPage, int?brandID, int?typeId) // @issue@I02
        {
            string cacheKey = String.Format(_itemsKeyTemplate, pageIndex, itemsPage, brandID, typeId);                   // @issue@I02

            return(await _cache.GetOrCreateAsync(cacheKey, async entry =>                                                // @issue@I02
            {
                entry.SlidingExpiration = _defaultCacheDuration;                                                         // @issue@I02
                return await _catalogService.GetCatalogItems(pageIndex, itemsPage, brandID, typeId);                     // @issue@I02
            }));
        }
Ejemplo n.º 3
0
 //public async Task<CatalogIndexViewModel> GetCatalogItems(int pageIndex, int itemsPage, int? brandID, int? typeId)
 //{
 //    string cacheKey = String.Format(_itemsKeyTemplate, pageIndex, itemsPage, brandID, typeId);
 //    return await _cache.GetOrCreateAsync(cacheKey, async entry =>
 //    {
 //        entry.SlidingExpiration = _defaultCacheDuration;
 //        return await _catalogService.GetCatalogItems(pageIndex, itemsPage, brandID, typeId);
 //    });
 //}
 public async Task <CatalogIndexViewModel> GetCatalogItems(int pageIndex, int itemsPage, int?brandID, int?typeId)
 {
     return(await _catalogService.GetCatalogItems(pageIndex, itemsPage, brandID, typeId));
 }