Skip to content

Commit

Permalink
More corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
wwelling committed Aug 20, 2024
1 parent 2b9aeda commit 0a71906
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,12 @@ public NamedList<Object> request(SolrRequest<?> request, String collection)
HttpServletRequest originatingRequest = ((ServletRequestAttributes) requestAttributes).getRequest();

// get a cache path from the path pattern
String cachePath = ((String) originatingRequest.getAttribute(HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE))
String cacheRequestPath = ((String) originatingRequest.getAttribute(HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE))
.replace(LEFT_CURLY_BRACKET, StringUtils.EMPTY)
.replace(RIGHT_CURLY_BRACKET, StringUtils.EMPTY);

// key as path in cache with UUID as cachePath/<UUID>.sdc => cacheLocation / cachePath / requestPath / <UUID>.sdc
String key = String.format("%s%s/lookup_table", StringUtils.removeEnd(index.getCacheLocation(), FORWARD_SLASH), cachePath);
// key as path as cacheLocation / cacheRequestPath / <UUID>.sdc
String key = String.format("%s%s/lookup_table", StringUtils.removeEnd(index.getCacheLocation(), FORWARD_SLASH), cacheRequestPath);

File lookupFile = getOrCreateLookupFile(key);

Expand Down Expand Up @@ -222,7 +222,7 @@ private synchronized File getOrCreateLookupFile(String key) {
}

/**
* Get lookup file by key or read lookup file provided is exists and is not a directory/
* Get lookup file by key or read lookup file provided if does exists and is not a directory.
*
* @param key
* @param lookupFile lookup file or request cache
Expand Down

0 comments on commit 0a71906

Please sign in to comment.