Ejemplo n.º 1
0
        protected virtual void OnChanged(CacheChangedEventArgs args)
        {
            var changed = this.Changed;

            if (changed != null)
            {
                changed(this, args);
            }
        }
		protected virtual void OnChanged(CacheChangedEventArgs args)
		{
			var changed = this.Changed;

			if(changed != null)
				changed(this, args);
		}
		private void MemoryCache_Changed(object sender, CacheChangedEventArgs e)
		{
			if(e.Reason != CacheChangedReason.Expired)
				return;

			var credential = e.OldValue as Credential;
			var now = DateTime.Now;

			if(credential != null && (now > credential.IssuedTime && now < credential.Expires))
				this.EnsureCredentialsTimeout(e.OldKey, credential.Timestamp);
		}