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