Skip to content

Commit

Permalink
Enable image cache custom
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnNiang committed Sep 10, 2019
1 parent 7bd43cc commit 8189cc0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/run/halo/app/utils/ImageUtils.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package run.halo.app.utils;

import com.google.common.io.Files;
import lombok.extern.slf4j.Slf4j;
import org.springframework.util.Assert;

Expand All @@ -21,6 +22,8 @@
public class ImageUtils {

private ImageUtils() {
ImageIO.setUseCache(true);
ImageIO.setCacheDirectory(Files.createTempDir());
}


Expand Down

0 comments on commit 8189cc0

Please sign in to comment.