Skip to main content

lower_route_cache_ir

Function lower_route_cache_ir 

Source
pub fn lower_route_cache_ir(h: &Handler) -> Option<CacheIr>
Expand description

#1228: a GET handler’s own @cache(maxAge:, scope:) freshness policy — bynk_ir::CacheIr’s own doc comment has the full grounding for why this is a standalone reader rather than a PolicyIr field. Field-for- field the same extraction emitter/workers_entry.rs’s own (now superseded) cache_policy_for did: only a GET yields a policy; project validation (bynk.http.cache_*) has already rejected a @cache anywhere else, and a malformed maxAge there, so a missing or ill-formed annotation here simply yields None — no &CheckedProgram needed, the same posture lower_policy_ir’s own doc comment already argues for: maxAge/scope are already-resolved syntactic literals (ExprKind::DurationLit/Ident), not a type this pass would ever need to resolve.