public void SaveTrace(as_trace item) { try { db.SaveTrace(item); RDL.CacheManager.PurgeCacheItems("as_trace"); } catch (Exception ex) { RDL.Debug.LogError(ex); } }
public as_trace GetTrace(int id) { var res = new as_trace(); var key = "as_trace_id_" + id.ToString(); if (CacheManager.EnableCaching && CacheManager.Cache[key] != null) { res = (as_trace)CacheManager.Cache[key]; } else { try { res = db.GetTraceById(id); CacheManager.CacheData(key, res); } catch (Exception ex) { Debug.LogError(ex); } } return(res); }