Class QueryCache

java.lang.Object
org.infinispan.query.core.impl.QueryCache

@ThreadSafe public final 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 Details

    • 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:
  • Constructor Details

    • QueryCache

      public QueryCache()
  • Method Details

    • get

      public <T> T get(String cacheName, 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()
    • clear

      public void clear(String cacheName)