Skip to content

Commit

Permalink
split node icon by node type——缓存1天
Browse files Browse the repository at this point in the history
  • Loading branch information
xlinliu committed Dec 13, 2023
1 parent 16a1f04 commit 523fe6c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ private NodeInfoVO transfer(NodeInfo nodeInfo, HttpServletRequest req) throws IO
public void getIcon(HttpServletResponse response, @PathVariable("nodeType") String nodeType) throws IOException {
byte[] icon = workflowNodeService.getNodeIcon(nodeType);
response.setContentType("image/svg+xml");
response.addHeader("Cache-Control", "max-age=3600, no-transform");
//图表缓存一天,24*60*60=86400秒
response.addHeader("Cache-Control", "max-age=86400, no-transform");
response.getOutputStream().write(icon);
}

Expand Down

0 comments on commit 523fe6c

Please sign in to comment.