Computes a deterministic TTL for a codelist based on a hash of its ID. This distributes codelist expirations across a time window to prevent all codelists from expiring simultaneously (thundering herd problem).
Examples
if (FALSE) { # \dontrun{
# Compute TTL for a codelist
ttl <- compute_codelist_ttl("CL_FREQ")
# Returns a value between 14 and 27 days
# Different codelists get different TTLs
ttl1 <- compute_codelist_ttl("CL_FREQ")
ttl2 <- compute_codelist_ttl("CL_ITTER107")
# ttl1 and ttl2 are deterministic but likely different
} # }