I'm working with ajax request and I received JSON object as a response from AJAX. Now I'm trying to cache that JSON object and how to get data from cache.I want to show the cache data from next request to the server with same request with same parameter values.
self.categorySelected = function (selectedCategory, event) {
$.ajax({
url: '/services/ShopService.asmx/XGetRefurbishedproducts',
data: JSON.stringify({ displayName: itemDisplayName, categoryid: selectedCategory.CategoryId(), language: lang }),
type: "POST",
dataType: "json",
cache: true,
contentType: "application/json; charset=utf-8",
beforeSend: function () { $(event.target).prop('disabled', true); }
}).done(function (data) {
//sample
})
}