In this variant, the body is not stored mixed in with the metadata, but is passed in (as a bytes-like object) in a separate call to ``set_body()``. That is, the expected interaction pattern is:: cache.set(key, serialized_metadata) cache.set_body(key) Similarly, th
| 53 | |
| 54 | |
| 55 | class SeparateBodyBaseCache(BaseCache): |
| 56 | """ |
| 57 | In this variant, the body is not stored mixed in with the metadata, but is |
| 58 | passed in (as a bytes-like object) in a separate call to ``set_body()``. |
| 59 | |
| 60 | That is, the expected interaction pattern is:: |
| 61 | |
| 62 | cache.set(key, serialized_metadata) |
| 63 | cache.set_body(key) |
| 64 | |
| 65 | Similarly, the body should be loaded separately via ``get_body()``. |
| 66 | """ |
| 67 | |
| 68 | def set_body(self, key: str, body: bytes) -> None: |
| 69 | raise NotImplementedError() |
| 70 | |
| 71 | def get_body(self, key: str) -> IO[bytes] | None: |
| 72 | """ |
| 73 | Return the body as file-like object. |
| 74 | """ |
| 75 | raise NotImplementedError() |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…