mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-25 09:18:51 -05:00
60 minutes grace period to make sure data is always fresh when TTL is almost about to be exceeded
This commit is contained in:
parent
08dd0d20ed
commit
8b86e69a8f
@ -12,15 +12,15 @@ public enum CacheType {
|
|||||||
|
|
||||||
Weekly(Duration.ofDays(12), true),
|
Weekly(Duration.ofDays(12), true),
|
||||||
|
|
||||||
Daily(Duration.ofDays(1), true),
|
Daily(Duration.ofHours(24), true),
|
||||||
|
|
||||||
Ephemeral(Duration.ofHours(2), false);
|
Ephemeral(Duration.ofHours(6), false);
|
||||||
|
|
||||||
final long timeToLiveSeconds;
|
final long timeToLiveSeconds;
|
||||||
final boolean diskPersistent;
|
final boolean diskPersistent;
|
||||||
|
|
||||||
CacheType(Duration timeToLive, boolean diskPersistent) {
|
CacheType(Duration timeToLive, boolean diskPersistent) {
|
||||||
this.timeToLiveSeconds = timeToLive.getSeconds();
|
this.timeToLiveSeconds = timeToLive.minusHours(1).getSeconds(); // 60 minutes grace period to make sure data is always fresh when TTL is almost about to be exceeded
|
||||||
this.diskPersistent = diskPersistent;
|
this.diskPersistent = diskPersistent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user