Class QueryCache


  • @ThreadSafe
    public class QueryCache
    extends Object
    A local cache for 'parsed' queries. Each cache manager has at most one QueryCache which is backed by a lazily created Cache.
    Since:
    7.0
    Author:
    anistor@redhat.com
    • Field Detail

      • QUERY_CACHE_NAME

        public static final String QUERY_CACHE_NAME
        Users can define a cache configuration with this name if they need to fine tune query caching. If they do not do so a default config is used (see getQueryCacheConfig()).
        See Also:
        Constant Field Values
    • Constructor Detail

      • QueryCache

        public QueryCache()
    • Method Detail

      • get

        public <T> T get​(String queryString,
                         List<org.infinispan.objectfilter.impl.aggregation.FieldAccumulator> accumulators,
                         Object queryTypeDiscriminator,
                         QueryCache.QueryCreator<T> queryCreator)
        Gets the cached query object. The key used for lookup is an object pair containing the query string and a discriminator value which is usually the Class of the cached query object and an optional List of FieldAccumulators.
      • clear

        public void clear()