Spindle_http.Cache_controlCache-Control, as RFC 9111 §5.2 writes it: directives, each with an argument or none.
Cache_control.parse {|max-age=60, private="Set-Cookie"|}
= Ok [ ("max-age", Some "60"); ("private", Some "Set-Cookie") ]A value to read and write: what a directive asks of a cache is the application's, and nothing here caches.
Each directive in order, its name lower-cased, as it is compared, and its argument as it came, a quoted string's escapes undone.
val parse : string -> (t, string) Stdlib.resultval to_string : t -> (string, string) Stdlib.resultEach directive, its argument a quoted string where it is no token, or Error for what parse would not read back as itself: a name that is no token or is not lower-cased, an argument no quoted string can hold.
val delta_seconds : t -> string -> int optionThe first name's argument as delta-seconds, where it is digits, quoted or not -- a recipient accepts either (RFC 9111 §5.2) -- and past what 31 bits hold, 2147483648, as §1.2.2 has a recipient read it.