Skip to content

Commit 6a1aac7

Browse files
committed
use the TimeUnit.HOURS.toMillis(1)
1 parent b5ee674 commit 6a1aac7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/org/apache/ibatis/cache/decorators/ScheduledCache.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
import org.apache.ibatis.cache.Cache;
1919

20+
import java.util.concurrent.TimeUnit;
21+
2022
/**
2123
* @author Clinton Begin
2224
*/
@@ -28,7 +30,7 @@ public class ScheduledCache implements Cache {
2830

2931
public ScheduledCache(Cache delegate) {
3032
this.delegate = delegate;
31-
this.clearInterval = 60 * 60 * 1_000L; // 1 hour
33+
this.clearInterval = TimeUnit.HOURS.toMillis(1);
3234
this.lastClear = System.currentTimeMillis();
3335
}
3436

0 commit comments

Comments
 (0)