Ejemplo n.º 1
0
        public void ResetCache(long companyId)
        {
            _productCacheRepository.Delete(companyId);
            var products = _productRepository.GetProductsForCacheCrawler(companyId, 0, 100000);
            List <HashProduct> productCaches = products.Select(variable => new HashProduct(variable)).ToList();

            _productCacheRepository.UpsertProductHashCache(companyId, productCaches);
            _productCacheRepository.IncreateCode(companyId, productCaches.Select(a => a.Id).ToList());
        }
Ejemplo n.º 2
0
        public ActionResult DeleteConfirmed(int id)
        {
            productRepository.Delete(id);
            productRepository.Save();

            //delete cache item
            cacheRepository.Delete(id);

            return(RedirectToAction("Index"));
        }