#31 -- Fix cache lifetime
All checks were successful
CI fuzzy controller / container-test-job (push) Successful in 3m32s
All checks were successful
CI fuzzy controller / container-test-job (push) Successful in 3m32s
This commit is contained in:
parent
12ded36f3e
commit
e4bcf493a4
@ -69,7 +69,7 @@ public class FuzzyRuleController {
|
|||||||
@GetMapping("/getVariables/{projectId}")
|
@GetMapping("/getVariables/{projectId}")
|
||||||
public List<VariableDto> getVariables(@PathVariable("projectId") Integer projectId,
|
public List<VariableDto> getVariables(@PathVariable("projectId") Integer projectId,
|
||||||
final HttpServletResponse response) {
|
final HttpServletResponse response) {
|
||||||
response.addHeader("Cache-Control", "max-age=60, must-revalidate, no-transform");
|
response.addHeader("Cache-Control", "max-age=10, must-revalidate, no-transform");
|
||||||
return variableService.getAllDtoByProject(projectId);
|
return variableService.getAllDtoByProject(projectId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ public class FuzzyRuleController {
|
|||||||
@GetMapping("/getInputVariables/{projectId}")
|
@GetMapping("/getInputVariables/{projectId}")
|
||||||
public List<VariableDto> getInputVariables(@PathVariable("projectId") Integer projectId,
|
public List<VariableDto> getInputVariables(@PathVariable("projectId") Integer projectId,
|
||||||
final HttpServletResponse response) {
|
final HttpServletResponse response) {
|
||||||
response.addHeader("Cache-Control", "max-age=60, must-revalidate, no-transform");
|
response.addHeader("Cache-Control", "max-age=10, must-revalidate, no-transform");
|
||||||
return variableService.getInputVariablesDtoByProject(projectId);
|
return variableService.getInputVariablesDtoByProject(projectId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,7 +93,7 @@ public class FuzzyRuleController {
|
|||||||
@GetMapping("/getFuzzyTerms/{variableId}")
|
@GetMapping("/getFuzzyTerms/{variableId}")
|
||||||
public List<FuzzyTerm> getTerms(@PathVariable("variableId") Integer variableId,
|
public List<FuzzyTerm> getTerms(@PathVariable("variableId") Integer variableId,
|
||||||
final HttpServletResponse response) {
|
final HttpServletResponse response) {
|
||||||
response.addHeader("Cache-Control", "max-age=60, must-revalidate, no-transform");
|
response.addHeader("Cache-Control", "max-age=10, must-revalidate, no-transform");
|
||||||
return fuzzyTermService.getByVariableId(variableId);
|
return fuzzyTermService.getByVariableId(variableId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user