internal void OnUnlockFailed(RedisCache sender, UnlockFailedEventArgs e)
        {
            var onUnlockFailed = UnlockFailed;

            if (onUnlockFailed == null)
            {
                // No-op.
            }
            else
            {
                onUnlockFailed(sender, e);
            }
        }
        internal void OnLockFailed(RedisCache sender, LockFailedEventArgs e)
        {
            var onLockFailed = LockFailed;

            if (onLockFailed == null)
            {
                throw new TimeoutException(
                    String.Format("Acquiring lock for '{0}' exceeded timeout '{1}'.", e.Key, e.AcquireLockTimeout)
                );
            }
            else
            {
                onLockFailed(sender, e);
            }
        }
        internal void OnException(RedisCache sender, ExceptionEventArgs e)
        {
            var onException = Exception;

            if (onException == null)
            {
                e.Throw = true;
            }
            else
            {
                onException(sender, e);
            }
        }