cachedResponseAge() — fiber Function Reference
Architecture documentation for the cachedResponseAge() function in cache.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD 91ff379d_ad97_f896_9c48_6574a957d3c1["cachedResponseAge()"] af95e058_7e86_ec88_42f0_cd294e342508["cache.go"] 91ff379d_ad97_f896_9c48_6574a957d3c1 -->|defined in| af95e058_7e86_ec88_42f0_cd294e342508 96447356_67b9_a364_148e_b703c487e1ba["New()"] 96447356_67b9_a364_148e_b703c487e1ba -->|calls| 91ff379d_ad97_f896_9c48_6574a957d3c1 03bedd00_a450_6002_7e6e_f9a1125a9591["clampDateSeconds()"] 91ff379d_ad97_f896_9c48_6574a957d3c1 -->|calls| 03bedd00_a450_6002_7e6e_f9a1125a9591 style 91ff379d_ad97_f896_9c48_6574a957d3c1 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
middleware/cache/cache.go lines 1142–1161
func cachedResponseAge(e *item, now uint64) uint64 {
clampedDate := clampDateSeconds(e.date, now)
resident := uint64(0)
if e.exp != 0 {
if e.exp <= now {
resident = e.ttl + (now - e.exp)
} else {
resident = e.ttl - (e.exp - now)
}
}
dateAge := uint64(0)
if clampedDate != 0 && now > clampedDate {
dateAge = now - clampedDate
}
currentAge := max(dateAge, max(resident, e.age))
return currentAge
}
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does cachedResponseAge() do?
cachedResponseAge() is a function in the fiber codebase, defined in middleware/cache/cache.go.
Where is cachedResponseAge() defined?
cachedResponseAge() is defined in middleware/cache/cache.go at line 1142.
What does cachedResponseAge() call?
cachedResponseAge() calls 1 function(s): clampDateSeconds.
What calls cachedResponseAge()?
cachedResponseAge() is called by 1 function(s): New.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free