My application has kendo dropdown list to show states. The state drop downlist has been used on multiple views.
@(Html.Kendo().DropDownListFor(m => m.BlankReturn.StateProvinceCode)
.DataTextField("StateName")
.DataValueField("StateCode")
.DataSource(source =>
{
source.Read(read =>
{
read.Action("GetStateProvinces", "Lookup");
});
})
)
Right now every instance of this dropdownlist makes a call to server to get states. I want kendo to load states from the server only on the first call but any subsequent call needs to get it from client cache. How do i configure this?
Update1
Few answers below suggest to use server side caching. I was looking for client side caching. For example jQuery's ajax method will cache GET
method result (unless you explicitly disabled caching). I am assuming Kendo is using jQuery to make server call internally. However i guess kendo is disabling ajax caching. So kendo makes the server call each time to get result.
My question is how do i enable client side caching so there wont be any server call after first call.