Implements interfaces: twisted.web.iweb.IPolicyForHTTPS

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 SinceTwisted 19.2.0
Method __init__
Method creatorForNetloc Create a client connection creator for a given network location and cache it for future use.
Instance Variable _policyForHTTPS See policyforHTTPS parameter of __init__.
Instance Variable _cache A cache associating hostnames to their client connection creators. (type: collections.OrderedDict)
Instance Variable _cacheSize See cacheSize parameter of __init__.
_policyForHTTPS =
See policyforHTTPS parameter of __init__.
_cache =
A cache associating hostnames to their client connection creators. (type: collections.OrderedDict)
_cacheSize =
See cacheSize parameter of __init__.
def __init__(self, policyforHTTPS, cacheSize=20): (source)
ParameterspolicyforHTTPSThe IPolicyForHTTPS to wrap. (type: IPolicyForHTTPS)
cacheSizeThe maximum size of the hostname cache. (type: int)
def creatorForNetloc(self, hostname, port): (source)

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

ParametershostnameThe hostname part of the URI. (type: bytes)
portThe port part of the URI. (type: int)
Returnsa connection creator with appropriate verification restrictions set (type: client connection creator)
API Documentation for Twisted, generated by pydoctor at 2019-04-10 22:20:19.