public void DeleteSetting(as_settings item) { try { RDL.CacheManager.PurgeCacheItems("as_settings"); db.DeleteSetting(item.id); } catch (Exception ex) { RDL.Debug.LogError(ex); } }
public bool SaveSetting(as_settings item) { try { db.SaveSetting(item); RDL.CacheManager.PurgeCacheItems("as_settings"); return(true); } catch (Exception ex) { RDL.Debug.LogError(ex); return(false); } }
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); }