package ldp

  1. Overview
  2. Docs

Module Http.CacheSource

Access to the underltying Cache module.

Sourceval clear : unit -> unit Lwt.t

Clear cache.

Sourceval get : (?headers:Cohttp.Header.t -> Iri.t -> (Cohttp.Response.t * Cohttp_lwt.Body.t) Lwt.t) -> ?headers:Cohttp.Header.t -> Iri.t -> (Cohttp.Response.t * string) Lwt.t

get call ?headers iri looks up in cache for iri and headers and returns the cached response, if any. Else uses call ?headers iri to retrieve the resource and stores it if request status is ok (code 2XX). The cookie header is removed from provided headers when looking and storing into cache.