Skip to content

Commit

Permalink
OAK-8978: Cache facet results, log format changed
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/oak/trunk@1875948 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
tihom88 committed Mar 31, 2020
1 parent f7c1076 commit ced53e1
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1605,15 +1605,15 @@ class DelayedLuceneFacetProvider implements FacetProvider {
@Override
public List<Facet> getFacets(int numberOfFacets, String columnName) throws IOException {
if (!CACHE_FACET_RESULTS) {
LOG.trace(CACHE_FACET_RESULTS_NAME + " = " + CACHE_FACET_RESULTS + " getting uncached results for columnName = " + columnName);
LOG.trace("{} = {} getting uncached results for columnName = {}", CACHE_FACET_RESULTS_NAME, CACHE_FACET_RESULTS, columnName );
return getFacetsUncached(numberOfFacets, columnName);
}
String cacheKey = columnName + "/" + numberOfFacets;
if (cachedResults.containsKey(cacheKey)) {
LOG.trace("columnName = " + columnName + " returning Facet Data from cache.");
LOG.trace("columnName = {} returning Facet Data from cache.", columnName);
return cachedResults.get(cacheKey);
}
LOG.trace("columnName = " + columnName + " facet Data not present in cache...");
LOG.trace("columnName = {} facet Data not present in cache...", columnName);
List<Facet> result = getFacetsUncached(numberOfFacets, columnName);
cachedResults.put(cacheKey, result);
return result;
Expand Down

0 comments on commit ced53e1

Please sign in to comment.