View Source RemotePersistentTerm.Fetcher.Http.Cache (RemotePersistentTerm v0.6.0)

A module to assist in following the HTTP Caching spec.

See more: https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching

Link to this section 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.

Link to this section 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.