MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / _get_cache_key

Method _get_cache_key

pymongo/ocsp_cache.py:59–65  ·  view source on GitHub ↗
(self, ocsp_request: OCSPRequest)

Source from the content-addressed store, hash-verified

57 self._lock = _create_lock()
58
59 def _get_cache_key(self, ocsp_request: OCSPRequest) -> CACHE_KEY_TYPE:
60 return self.CACHE_KEY_TYPE(
61 hash_algorithm=ocsp_request.hash_algorithm.name.lower(),
62 issuer_name_hash=ocsp_request.issuer_name_hash,
63 issuer_key_hash=ocsp_request.issuer_key_hash,
64 serial_number=ocsp_request.serial_number,
65 )
66
67 def __setitem__(self, key: OCSPRequest, value: OCSPResponse) -> None:
68 """Add/update a cache entry.

Callers 3

__setitem__Method · 0.95
__getitem__Method · 0.95
_add_mock_cache_entryMethod · 0.80

Calls

no outgoing calls

Tested by 1

_add_mock_cache_entryMethod · 0.64