class documentation

class HostnameCachingHTTPSPolicy: (source)

Implements interfaces: twisted.web.iweb.IPolicyForHTTPS

View In Hierarchy

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.
Instance Variable _cacheSize See cacheSize parameter of __init__.
_policyForHTTPS = (source)
See policyforHTTPS parameter of __init__.
_cache = (source)
A cache associating hostnames to their client connection creators.
(type: collections.OrderedDict)
_cacheSize = (source)
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 21.2.0 at 2021-02-28 21:00:42.