class documentation

IPolicyForHTTPS that wraps a IPolicyForHTTPS and caches the created IOpenSSLClientConnectionCreator.

This policy will cache up to cacheSize client connection creators for reuse in subsequent requests to the same hostname.

Present Since
Twisted 19.2.0
Method __init__ No summary
Method creatorForNetloc Create a client connection creator for a given network location and cache it for future use.
Instance Variable _cache A cache associating hostnames to their client connection creators.
Instance Variable _cacheSize See cacheSize parameter of __init__.
Instance Variable _policyForHTTPS See policyforHTTPS parameter of __init__.
def __init__(self, policyforHTTPS, cacheSize=20): (source)
Parameters
policyforHTTPS:IPolicyForHTTPSThe IPolicyForHTTPS to wrap.
cacheSize:intThe maximum size of the hostname cache.
def creatorForNetloc(self, hostname, port): (source)

Create a client connection creator for a given network location and cache it for future use.

Parameters
hostname:bytesThe hostname part of the URI.
port:intThe port part of the URI.
Returns
client connection creatora connection creator with appropriate verification restrictions set

A cache associating hostnames to their client connection creators.

_cacheSize = (source)

See cacheSize parameter of __init__.

_policyForHTTPS = (source)

See policyforHTTPS parameter of __init__.