I am adding to the following value to the cache:
HttpContext.Cache.Insert(
"ClientId", clientid, null,
DateTime.UtcNow.AddYears(1), TimeSpan.Zero
);
I don’t want the cache to expire so I set the date 1 year from now (DateTime.UtcNow.AddYears(1)) however after 30 minutes the cached value is no longer there.
I don’t know why your code doesn’t work but if you don’t want to expire the value, then you can use the
HttpContext.Current.Application.Add("ClientID", value)