Lookup Terms Filter _cache parameter not being taken into account

fixes #3219
This commit is contained in:
Shay Banon 2013-06-24 15:22:43 +02:00
parent 432628086f
commit 80ede081c3

View File

@ -169,7 +169,10 @@ public class TermsFilterParser implements FilterParser {
cacheKey = new CacheKeyFilter.Key(termsLookup.toString());
}
Filter filter = termsFilterCache.lookupTermsFilter(cacheKey, termsLookup);
filter = parseContext.cacheFilter(filter, null); // cacheKey is passed as null, so we don't double cache the key
// cache the whole filter by default, or if explicitly told to
if (cache == null || cache) {
filter = parseContext.cacheFilter(filter, null); // cacheKey is passed as null, so we don't double cache the key
}
return filter;
}