private void btnRefreshCache_Click(object sender, EventArgs e) { Task.Run(() => { testRefreshCache = true; CacheUtil.DeleteAll(); List <PtCameraInfo> list = GetData2(); Log("list 数量:" + list.Count); testRefreshCache = false; }); }