class HostnameCachingHTTPSPolicy: (source)
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 Since | |
Twisted 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 | _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__ . |
Parameters | |
policyforHTTPS:IPolicyForHTTPS | The IPolicyForHTTPS to wrap. |
cacheSize:int | The maximum size of the hostname cache. |
client connection creator
for a given network location and cache it for future use.Parameters | |
hostname:bytes | The hostname part of the URI. |
port:int | The port part of the URI. |
Returns | |
client connection creator | a connection creator with appropriate verification restrictions set |