MCPcopy Create free account
hub / github.com/requests-cache/requests-cache / __init__

Method __init__

requests_cache/backends/dynamodb.py:35–57  ·  view source on GitHub ↗
(
        self,
        table_name: str = 'http_cache',
        create_table: bool = True,
        *,
        ttl: bool = True,
        connection: Optional[ServiceResource] = None,
        decode_content: bool = True,
        serializer: Optional[SerializerType] = None,
        **kwargs,
    )

Source from the content-addressed store, hash-verified

33 """
34
35 def __init__(
36 self,
37 table_name: str = 'http_cache',
38 create_table: bool = True,
39 *,
40 ttl: bool = True,
41 connection: Optional[ServiceResource] = None,
42 decode_content: bool = True,
43 serializer: Optional[SerializerType] = None,
44 **kwargs,
45 ):
46 super().__init__(cache_name=table_name, **kwargs)
47 skwargs = {'serializer': serializer, **kwargs} if serializer else kwargs
48 self.responses = DynamoDbDict(
49 table_name,
50 create_table=create_table,
51 ttl=ttl,
52 connection=connection,
53 decode_content=decode_content,
54 **skwargs,
55 )
56 # Redirects will be only stored in memory and not persisted
57 self.redirects: BaseStorage[str, str] = DictStorage()
58
59
60class DynamoDbDict(BaseStorage):

Callers

nothing calls this directly

Calls 3

DynamoDbDictClass · 0.85
DictStorageClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected