(
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,
)
| 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 | |
| 60 | class DynamoDbDict(BaseStorage): |
nothing calls this directly
no test coverage detected