class documentation
class HostnameCachingHTTPSPolicy: (source)
Constructor: HostnameCachingHTTPSPolicy(policyforHTTPS, cacheSize)
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__ |
No summary |
| Method | creator |
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 | _cache |
See cacheSize parameter of __init__. |
| Instance Variable | _policy |
See policyforHTTPS parameter of __init__. |
| Parameters | |
policyforIPolicyForHTTPS | The IPolicyForHTTPS to wrap. |
cacheint | The maximum size of the hostname cache. |
Create a 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 |