public as_settings GetSetting(int id) { var res = new as_settings(); var key = "as_settings_id_" + id; if (CacheManager.EnableCaching && CacheManager.Cache[key] != null) { res = (as_settings)CacheManager.Cache[key]; } else { try { res = db.GetSetting(id); CacheManager.CacheData(key, res); }catch (Exception ex) { Debug.LogError(ex); } } return(res); }