/** * Return the number of cache entries that have been removed from the cache * either in order to stay under the maximum configured size/ram usage, or * because a segment has been closed. High numbers of evictions might mean * that queries are not reused or that the {@link QueryCachingPolicy * caching policy} caches too aggressively on NRT segments which get merged * early. * @see #getCacheCount() * @see #getCacheSize() */ public final long getEvictionCount() { return getCacheCount() - getCacheSize(); }
recomputedCacheSize += leafCache.cache.size(); if (recomputedCacheSize != getCacheSize()) { throw new AssertionError("cacheSize mismatch : " + getCacheSize() + " != " + recomputedCacheSize);
/** Clear all entries that belong to the given index. */ public void clearIndex(String index) { final Set<Object> coreCacheKeys = shardKeyMap.getCoreKeysForIndex(index); for (Object coreKey : coreCacheKeys) { cache.clearCoreCacheKey(coreKey); } // This cache stores two things: filters, and doc id sets. Calling // clear only removes the doc id sets, but if we reach the situation // that the cache does not contain any DocIdSet anymore, then it // probably means that the user wanted to remove everything. if (cache.getCacheSize() == 0) { cache.clear(); } }
@Override public long getCacheSize() { LRUQueryCache defaultQueryCache = indexSearcherProvider.getDefaultQueryCache(); return defaultQueryCache.getCacheSize(); }
/** * Return the number of cache entries that have been removed from the cache * either in order to stay under the maximum configured size/ram usage, or * because a segment has been closed. High numbers of evictions might mean * that queries are not reused or that the {@link QueryCachingPolicy * caching policy} caches too aggressively on NRT segments which get merged * early. * @see #getCacheCount() * @see #getCacheSize() */ public final long getEvictionCount() { return getCacheCount() - getCacheSize(); }
/** * Return the number of cache entries that have been removed from the cache * either in order to stay under the maximum configured size/ram usage, or * because a segment has been closed. High numbers of evictions might mean * that queries are not reused or that the {@link QueryCachingPolicy * caching policy} caches too aggressively on NRT segments which get merged * early. * @see #getCacheCount() * @see #getCacheSize() */ public final long getEvictionCount() { return getCacheCount() - getCacheSize(); }
/** * Return the number of cache entries that have been removed from the cache * either in order to stay under the maximum configured size/ram usage, or * because a segment has been closed. High numbers of evictions might mean * that queries are not reused or that the {@link QueryCachingPolicy * caching policy} caches too aggressively on NRT segments which get merged * early. * @see #getCacheCount() * @see #getCacheSize() */ public final long getEvictionCount() { return getCacheCount() - getCacheSize(); }
recomputedCacheSize += leafCache.cache.size(); if (recomputedCacheSize != getCacheSize()) { throw new AssertionError("cacheSize mismatch : " + getCacheSize() + " != " + recomputedCacheSize);
recomputedCacheSize += leafCache.cache.size(); if (recomputedCacheSize != getCacheSize()) { throw new AssertionError("cacheSize mismatch : " + getCacheSize() + " != " + recomputedCacheSize);
recomputedCacheSize += leafCache.cache.size(); if (recomputedCacheSize != getCacheSize()) { throw new AssertionError("cacheSize mismatch : " + getCacheSize() + " != " + recomputedCacheSize);
/** Clear all entries that belong to the given index. */ public void clearIndex(String index) { final Set<Object> coreCacheKeys = shardKeyMap.getCoreKeysForIndex(index); for (Object coreKey : coreCacheKeys) { cache.clearCoreCacheKey(coreKey); } // This cache stores two things: filters, and doc id sets. Calling // clear only removes the doc id sets, but if we reach the situation // that the cache does not contain any DocIdSet anymore, then it // probably means that the user wanted to remove everything. if (cache.getCacheSize() == 0) { cache.clear(); } }
/** Clear all entries that belong to the given index. */ public void clearIndex(String index) { final Set<Object> coreCacheKeys = shardKeyMap.getCoreKeysForIndex(index); for (Object coreKey : coreCacheKeys) { cache.clearCoreCacheKey(coreKey); } // This cache stores two things: filters, and doc id sets. Calling // clear only removes the doc id sets, but if we reach the situation // that the cache does not contain any DocIdSet anymore, then it // probably means that the user wanted to remove everything. if (cache.getCacheSize() == 0) { cache.clear(); } }
/** Clear all entries that belong to the given index. */ public void clearIndex(String index) { final Set<Object> coreCacheKeys = shardKeyMap.getCoreKeysForIndex(index); for (Object coreKey : coreCacheKeys) { cache.clearCoreCacheKey(coreKey); } // This cache stores two things: filters, and doc id sets. Calling // clear only removes the doc id sets, but if we reach the situation // that the cache does not contain any DocIdSet anymore, then it // probably means that the user wanted to remove everything. if (cache.getCacheSize() == 0) { cache.clear(); } }
/** Clear all entries that belong to the given index. */ public void clearIndex(String index) { final Set<Object> coreCacheKeys = shardKeyMap.getCoreKeysForIndex(index); for (Object coreKey : coreCacheKeys) { cache.clearCoreCacheKey(coreKey); } // This cache stores two things: filters, and doc id sets. Calling // clear only removes the doc id sets, but if we reach the situation // that the cache does not contain any DocIdSet anymore, then it // probably means that the user wanted to remove everything. if (cache.getCacheSize() == 0) { cache.clear(); } }
private QueryCacheStats(final LRUQueryCache queryCache) { this(queryCache.getCacheCount(), queryCache.getCacheSize(), queryCache.getEvictionCount(), queryCache.getHitCount(), queryCache.getMissCount(), queryCache.getTotalCount(), (float) (queryCache.getHitCount() * 100) / queryCache.getTotalCount(), (float) (queryCache.getMissCount() * 100) / queryCache.getTotalCount()); }