my controller's methods uses the same query result to return various result (Jsonresult,actionresult) is there a way to cache the result in memory so that there is only one trip to data base for all controller methods so instead of executing the query the methods uses the result in cache
the variable that i want to cache is var x = from cus in db.BIOBillPh( )
public ActionResult BillPhp(string CodePays)
{
var x = from cus in db.BIOBillPh( )
select cus;
return PartialView(x);
}
public JsonResult PaysBU(string Pays)
{
var x = from cus in db.BIOBillPh()
select cus;
return Json(x, JsonRequestBehavior.AllowGet);
}