MCPcopy
hub / github.com/gofiber/fiber / remainingFreshness

Function remainingFreshness

middleware/cache/utils.go:54–60  ·  view source on GitHub ↗
(e *item, now uint64)

Source from the content-addressed store, hash-verified

52}
53
54func 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
62func isHeuristicFreshness(e *item, cfg *Config, entryAge uint64) bool {
63 const heuristicAgeThresholdSeconds = uint64(24 * time.Hour / time.Second)

Callers 2

NewFunction · 0.85

Calls

no outgoing calls

Tested by 1