예제 #1
0
 public void SaveMenu(as_menu item)
 {
     try
     {
         db.SaveMenu(item);
         RDL.CacheManager.PurgeCacheItems("as_menu");
     }
     catch (Exception ex)
     {
         RDL.Debug.LogError(ex);
     }
 }
예제 #2
0
        public as_menu GetMenu(int id)
        {
            var res = new as_menu();
            var key = "as_menu_id_" + id;

            if (CacheManager.EnableCaching && CacheManager.Cache[key] != null)
            {
                res = (as_menu)CacheManager.Cache[key];
            }
            else
            {
                try
                {
                    res = db.GetMenu(id);
                    CacheManager.CacheData(key, res);
                }
                catch (Exception ex)
                {
                    Debug.LogError(ex);
                }
            }
            return(res);
        }