· 7 years ago · Apr 30, 2018, 01:36 PM
1 public static void ResetIDWallCache()
2 {
3 System.Net.WebClient wc = new System.Net.WebClient();
4
5 try
6 {
7 var Params = new Dictionary<string, object>()
8 {
9 { "UserID", 2 }
10 };
11
12 var SecretKey = new byte[] { 164, 60, 194, 0, 161, 189, 41, 38, 130, 89, 141, 164, 45, 170, 159, 209, 69, 137, 243, 216, 191, 131, 47, 250, 32, 107, 231, 117, 37, 158, 225, 111 };
13 string JwtToken = Jose.JWT.Encode(Params, SecretKey, Jose.JwsAlgorithm.HS256);
14
15 string URL = string.Format("https://{0}/Settings/ClearCacheFromExternal?JwtToken={1}", CConverter.GetStringFromObject(IDWallDomain), JwtToken);
16 log.Info("Clear idwall cache : " + URL);
17 wc.DownloadData(URL);
18 }
19 catch (Exception ex)
20 {
21 log.Error(ex.Message);
22 }
23 }