/// <summary>
        /// Invalidates all of the cache entries which are dependent on any of the specified root keys.
        /// </summary>
        /// <param name="cacheKey">Stores information of the computed key of the input LINQ query.</param>
        public void InvalidateCacheDependencies(EFCacheKey cacheKey)
        {
            _readerWriterLockProvider.TryWriteLocked(() =>
            {
                foreach (var rootCacheKey in cacheKey.CacheDependencies)
                {
                    if (string.IsNullOrWhiteSpace(rootCacheKey))
                    {
                        continue;
                    }

                    var cachedValue    = _easyCachingProvider.Get <EFCachedData>(cacheKey.KeyHash);
                    var dependencyKeys = _easyCachingProvider.Get <HashSet <string> >(rootCacheKey);
                    if (areRootCacheKeysExpired(cachedValue, dependencyKeys))
                    {
                        _logger.LogDebug(CacheableEventId.QueryResultInvalidated,
                                         $"Invalidated all of the cache entries due to early expiration of a root cache key[{rootCacheKey}].");
                        ClearAllCachedEntries();
                        return;
                    }

                    clearDependencyValues(dependencyKeys);
                    _easyCachingProvider.Remove(rootCacheKey);
                }
            });
        }
        /// <summary>
        /// Invalidates all of the cache entries which are dependent on any of the specified root keys.
        /// </summary>
        /// <param name="cacheKey">Stores information of the computed key of the input LINQ query.</param>
        public void InvalidateCacheDependencies(EFCacheKey cacheKey)
        {
            _readerWriterLockProvider.TryWriteLocked(() =>
            {
                foreach (var rootCacheKey in cacheKey.CacheDependencies)
                {
                    if (string.IsNullOrWhiteSpace(rootCacheKey))
                    {
                        continue;
                    }

                    clearDependencyValues(rootCacheKey);
                    _easyCachingProvider.Remove(rootCacheKey);
                }
            });
        }