Commit df73544a authored by Szabolcs Gyurko's avatar Szabolcs Gyurko
Browse files

Removed unused cache key generator

parent 3d567eca
Pipeline #298 failed with stage
in 1 minute and 2 seconds
......@@ -43,27 +43,6 @@ import javax.servlet.ServletRequest;
@EnableCaching
public class CacheConfig {
@Bean
KeyGenerator pathBasedKeyGenerator() {
return (target, method, params) -> {
boolean withComponents = false;
if (params.length == 0) {
return SimpleKey.EMPTY;
}
for (Object param : params) {
if (param instanceof Boolean) {
withComponents = Boolean.valueOf(param.toString());
}
if (param instanceof ServletRequest) {
return ((ServletRequest) param).getAttribute(HandlerMapping.PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE)
+ (withComponents ? ":withComponent" : "");
}
}
return SimpleKey.EMPTY;
};
}
@Bean
KeyGenerator pathBasedKeyGeneratorWithDimensionAndMimeType() {
return (target, method, params) -> {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment