diff --git a/src/main/java/edu/tamu/scholars/middleware/service/CachingSolrClient.java b/src/main/java/edu/tamu/scholars/middleware/service/CachingSolrClient.java index 295ea4e0..b1da7826 100644 --- a/src/main/java/edu/tamu/scholars/middleware/service/CachingSolrClient.java +++ b/src/main/java/edu/tamu/scholars/middleware/service/CachingSolrClient.java @@ -132,12 +132,12 @@ public NamedList 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/.sdc => cacheLocation / cachePath / requestPath / .sdc - String key = String.format("%s%s/lookup_table", StringUtils.removeEnd(index.getCacheLocation(), FORWARD_SLASH), cachePath); + // key as path as cacheLocation / cacheRequestPath / .sdc + String key = String.format("%s%s/lookup_table", StringUtils.removeEnd(index.getCacheLocation(), FORWARD_SLASH), cacheRequestPath); File lookupFile = getOrCreateLookupFile(key); @@ -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