twisted.web.client.HostnameCachingHTTPSPolicy(object)
class documentationtwisted.web.client
View Source
(View In Hierarchy)
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 | _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__ . |
client
connection creators
. (type: collections.OrderedDict
)
Parameters | policyforHTTPS | The IPolicyForHTTPS to wrap. (type: IPolicyForHTTPS ) |
cacheSize | The maximum size of the hostname cache. (type: int ) |
Create a client
connection creator
for a given network location and cache it for
future use.
Parameters | hostname | The hostname part of the URI. (type: bytes ) |
port | The port part of the URI. (type: int ) | |
Returns | a connection creator with appropriate verification restrictions set (type: client
connection creator ) |