# Module Http_client_conncache

    module Http_client_conncache: sig .. end

Connection cache

This module allows one to create special connection caches, e.g. by deriving from the official ones

    type channel_binding_id = int

Same as in `Http_client.channel_binding_id`

    type conn_state = [ `Active of <  > | `Inactive of channel_binding_id ]

A TCP connection may be either ``Inactive`, i.e. it is not used by any pipeline, or ``Active obj`, i.e. it is in use by the pipeline `obj` (this is the `Http_client.pipeline` coerced to `< >`).

Since Ocamlnet-3.3, ``Inactive` connections carry the channel binding ID as argument.

    type peer = [ `Direct of string * int
           | `Http_proxy of string * int
           | `Http_proxy_connect of (string * int) * (string * int)
           | `Socks5 of (string * int) * (string * int) ]

    class type connection_cache = object .. end

    class restrictive_cache : unit -> connection_cache

A restrictive cache closes connections as soon as there are no pending requests.

    class aggressive_cache : unit -> connection_cache

This type of cache tries to keep connections as long open as possible.