public JsonResult BUCodeLookup(string ObjKy, string PreKy = "1") { int UsrKy = HTNSession.UsrKy; int CKy = HTNSession.CKy; List <BUModel> PettySettle = new List <BUModel>(); string key = "BUCode" + "-" + "ObjKy " + ObjKy.ToString() + ":" + PreKy + "-CKy:" + CKy; var BUlist = HTNCache.GetCachedObject(key); if (BUlist != null) { PettySettle = (List <BUModel>)BUlist; var countno = PettySettle.Count(); } else { PettySettle = apiOpr.BUCodeLookup(HTNSession.Environment, CKy, UsrKy, ObjKy, PreKy); HTNCache.SetCachedObject(key, PettySettle, 3600); } return(Json(PettySettle, JsonRequestBehavior.AllowGet)); }