/// <summary>
            /// Create a new <c>QueryInfo</c>.
            /// </summary>
            /// <param name="parameters">The query parameters.</param>
            /// <param name="loader">The loader.</param>
            /// <param name="querySpaces">The query spaces.</param>
            /// <param name="session">The session of the query.</param>
            public QueryInfo(
                QueryParameters parameters, Loader.Loader loader, ISet <string> querySpaces,
                ISessionImplementor session)
            {
                Parameters  = parameters;
                Loader      = loader;
                QuerySpaces = querySpaces;

                IsCacheable = loader.IsCacheable(parameters);
                if (!IsCacheable)
                {
                    return;
                }

                CacheKey        = Loader.GenerateQueryKey(session, Parameters);
                CanGetFromCache = Parameters.CanGetFromCache(session);
                CanPutToCache   = Parameters.CanPutToCache(session);
            }