(self, name: str)
| 56 | return hashlib.sha224(x.encode()).hexdigest() |
| 57 | |
| 58 | def _fn(self, name: str) -> str: |
| 59 | # NOTE: This method should not change as some may depend on it. |
| 60 | # See: https://github.com/ionrock/cachecontrol/issues/63 |
| 61 | hashed = self.encode(name) |
| 62 | parts = list(hashed[:5]) + [hashed] |
| 63 | return os.path.join(self.directory, *parts) |
| 64 | |
| 65 | def get(self, key: str) -> bytes | None: |
| 66 | name = self._fn(key) |