Skip to main content

opa_cache_expiry

Function opa_cache_expiry 

Source
pub fn opa_cache_expiry(now_ms: i128, ttl_ms: i64) -> OpaCacheExpiry
Expand description

Compute a deadline ttl_ms after now_ms.

A decision is cached exactly when the TTL is positive and the deadline is representable: DoNotCache iff ttl_ms <= 0 or now_ms + ttl_ms overflows i128.