allowsSharedCacheDirectives() — fiber Function Reference
Architecture documentation for the allowsSharedCacheDirectives() function in cache.go from the fiber codebase.
Entity Profile
Dependency Diagram
graph TD 9177a6e5_17ee_0a06_bc94_1496d2df5cae["allowsSharedCacheDirectives()"] af95e058_7e86_ec88_42f0_cd294e342508["cache.go"] 9177a6e5_17ee_0a06_bc94_1496d2df5cae -->|defined in| af95e058_7e86_ec88_42f0_cd294e342508 96447356_67b9_a364_148e_b703c487e1ba["New()"] 96447356_67b9_a364_148e_b703c487e1ba -->|calls| 9177a6e5_17ee_0a06_bc94_1496d2df5cae ea417faa_7430_475e_658c_60dc32257ec8["allowsSharedCache()"] ea417faa_7430_475e_658c_60dc32257ec8 -->|calls| 9177a6e5_17ee_0a06_bc94_1496d2df5cae style 9177a6e5_17ee_0a06_bc94_1496d2df5cae fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
middleware/cache/cache.go lines 1339–1351
func allowsSharedCacheDirectives(cc responseCacheControl) bool {
if cc.hasPrivate {
return false
}
if cc.hasPublic || cc.sMaxAgeSet || cc.mustRevalidate || cc.proxyRevalidate {
return true
}
// RFC 9111 §4.2.2 permits Expires as an absolute expiry for cacheable responses, but for
// authenticated requests §3.6 requires an explicit shared-cache directive. Therefore,
// an Expires header alone MUST NOT allow sharing when Authorization is present.
return false
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does allowsSharedCacheDirectives() do?
allowsSharedCacheDirectives() is a function in the fiber codebase, defined in middleware/cache/cache.go.
Where is allowsSharedCacheDirectives() defined?
allowsSharedCacheDirectives() is defined in middleware/cache/cache.go at line 1339.
What calls allowsSharedCacheDirectives()?
allowsSharedCacheDirectives() is called by 2 function(s): New, allowsSharedCache.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free