public Task <AdminAccountModel> GetAdminAccountAsync()
        {
            _memoryCache.TryGetValue(CacheKey, out AdminSettingCacheModel raw);
            if (raw == null)
            {
                raw = SetToCache();
            }
            var model = new AdminAccountModel
            {
                Id       = raw.Id,
                Password = (DataSecurityUltils.Decrypt(raw.Password ?? "", ApplicationConfigs.SpojKey.ForPassword)),
                Username = (DataSecurityUltils.Decrypt(raw.UserName ?? "", ApplicationConfigs.SpojKey.ForUserName))
            };


            return(Task.FromResult(model));
        }
        public Task <AdminSystemEmailInfoModel> GetEmailInfo()
        {
            _memoryCache.TryGetValue(CacheKey, out AdminSettingCacheModel raw);

            if (raw == null)
            {
                raw = SetToCache();
            }
            var model = new AdminSystemEmailInfoModel
            {
                Id       = raw.Id,
                Password = (DataSecurityUltils.Decrypt(raw.SystemEmailPasswordEncode ?? "", ApplicationConfigs.SpojKey.ForPassword)),
                Email    = raw.SystemEmail
            };

            return(Task.FromResult(model));
        }
        public Task <AdminSettingModel> GetCache()
        {
            _memoryCache.TryGetValue(CacheKey, out AdminSettingCacheModel raw);
            if (raw == null)
            {
                raw = SetToCache();
            }

            var model = new AdminSettingModel
            {
                TestCaseLimitation = raw.TestCaseLimitation,
                Username           = (DataSecurityUltils.Decrypt(raw.UserName ?? "", ApplicationConfigs.SpojKey.ForUserName)),
                Id          = raw.Id,
                ContestName = raw.ContestName,
                SystemEmail = raw.SystemEmail
            };


            return(Task.FromResult(model));
        }