RemotePersistentTerm.Fetcher.Http.Cache (RemotePersistentTerm v0.9.0)
View SourceA module to assist in following the HTTP Caching spec.
See more: https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching
Summary
Functions
Calculates the refresh interval from the cache-control and age headers. Caching directives are case-insensitive. Multiple directives are permitted and must be comma-separated.
Functions
@spec refresh_interval(Req.Response.t()) :: {:ok, pos_integer()} | {:error, String.t()}
Calculates the refresh interval from the cache-control and age headers. Caching directives are case-insensitive. Multiple directives are permitted and must be comma-separated.
Refresh interval is in milliseconds.