throw new DandelionException(msg.toString());
}
// Otherwise check for the locator
String location = null;
AssetLocator locator = locators.get(locationKey);
if (locators.containsKey(locationKey) && locators.get(locationKey).isActive()) {
LOG.trace("Locator '{}' will be applied on the asset {}.", locator.getClass().getSimpleName(), asu.toLog());
location = locators.get(locationKey).getLocation(asu, request);
}
asset.setConfigLocationKey(locationKey);
asset.setConfigLocation(asu.getLocations().get(locationKey));
if (locator.isCachingForced() || this.context.getConfiguration().isMinificationEnabled()) {
String context = UrlUtils.getCurrentUrl(request, true).toString();
context = context.replaceAll("\\?", "_").replaceAll("&", "_");
String cacheKey = this.context.getCacheManager().generateCacheKey(context, asset);
asu.setCacheKey(cacheKey);
asset.setCacheKey(cacheKey);