Example #1
0
        void InitCache()
        {
            LogHelper.Insert("Function app cache init start", LogType.Info);
            var list = AllAppMgr.GetAllForFactory();

            _appDic = list.ToDictionary(d => d.Name, d => d.Idx);

            var list2 = AllLogfunctionMgr.GetAllForFactory();

            _functionDic = list2.ToDictionary(d => d.Name, d => d.Idx);

            var list3 = AllZoneinfoMgr.GetAllForFactory();

            foreach (var entity in list3)
            {
                entity.ApiHost = entity.ApiUrl.ToLower().Replace("http://", "").TrimEnd('/');
            }
            _zoneDic         = list3.ToDictionary(d => d.ZoneName.ToLower(), d => d);
            _zonePlatformDic = list3.ToDictionary(d => BuildZoneKey(d.PlatformCode, d.PlatformZoneName), d => d);
            LogHelper.Insert("Function app cache init end", LogType.Info);
        }