}
LOGGER.finer("No matching ETag, returning cached tile");
final String mimeType = cachedTile.getMimeType().getMimeType();
RawMap map = new RawMap(null, tileBytes, mimeType);
map.setContentDispositionHeader(null, "." + cachedTile.getMimeType().getFileExtension(), false);
Integer cacheAgeMax = getCacheAge(layer);
LOGGER.log(Level.FINE, "Using cacheAgeMax {0}", cacheAgeMax);
if (cacheAgeMax != null) {
map.setResponseHeader("Cache-Control", "max-age=" + cacheAgeMax);
} else {
map.setResponseHeader("Cache-Control", "no-cache");
}
setConditionalGetHeaders(map, cachedTile, request, etag);
setCacheMetadataHeaders(map, cachedTile, layer);