public IHttpActionResult UpdateCache(ProductType product) { //New product type created on host(server) CacheUpdateResult result = new CacheUpdateResult() { Id = product.Id, CachedOn = DateTime.Now, OnServer = Dns.GetHostName() }; //And cached with product type ProductTypeCacheStore.Add(product, result); return(Ok(result)); }
public IHttpActionResult GetAllProductTypes() { List <ProductTypeCache> result = ProductTypeCacheStore.GetAll(); return(Ok(result)); }