定时执行更新Redis缓存操作
protected void Application_Start(object sender, EventArgs e) { Timer timer = new Timer(); timer.Enabled = true; timer.Interval = 3600000; //执行间隔时间,单位为毫秒; 这里实际间隔为1小时 timer.Start(); timer.Elapsed += new System.Timers.ElapsedEventHandler(OrgCacheInterval); } /// <summary> /// 定时检测组织机构缓存是否需要更新 /// </summary> /// <param name="source"></param> /// <param name="e"></param> public void OrgCacheInterval(object source, ElapsedEve