public bool TryGet(string key, out WindowsAuthenticationHandshake handshake) { bool result = false; handshake = null; if (handshakeCache.Contains(key)) { object cachedHandshake = handshakeCache[key]; if (cachedHandshake != null) { handshake = cachedHandshake as WindowsAuthenticationHandshake; result = true; } } return result; }
public void Add(string key, WindowsAuthenticationHandshake handshake) { handshakeCache.Set(key, handshake, GetCacheItemPolicy()); }