(e *item, now uint64)
| 52 | } |
| 53 | |
| 54 | func remainingFreshness(e *item, now uint64) uint64 { |
| 55 | if e == nil || e.exp == 0 || now >= e.exp { |
| 56 | return 0 |
| 57 | } |
| 58 | |
| 59 | return e.exp - now |
| 60 | } |
| 61 | |
| 62 | func isHeuristicFreshness(e *item, cfg *Config, entryAge uint64) bool { |
| 63 | const heuristicAgeThresholdSeconds = uint64(24 * time.Hour / time.Second) |
no outgoing calls