class documentation

class IntersphinxCache(CacheT):

View In Hierarchy

An Intersphinx cache.
Class Method from​Parameters Construct an instance with the given parameters.
Method get Retrieve a URL using the cache.
Instance Variable ​_session A session that may or may not cache requests.
@classmethod
def fromParameters(cls, sessionFactory, cachePath, maxAgeDictionary):
Construct an instance with the given parameters.
Parameters
session​Factory:Callable[[], requests.Session]A zero-argument callable that returns a requests.Session.
cache​Path:strPath of the cache directory.
max​Age​Dictionary:Mapping[str, int]A mapping describing the maximum age of any cache entry.
Returns
IntersphinxCacheUndocumented
See Also
parseMaxAge
def get(self, url):
Retrieve a URL using the cache.
Parameters
url:strThe URL to retrieve.
Returns
Optional[bytes]The body of the URL, or None on failure.
_session: requests.Session =
A session that may or may not cache requests.