Write schema to cache.
(self, version: str, schema: dict[str, Any])
| 37 | return None |
| 38 | |
| 39 | def put(self, version: str, schema: dict[str, Any]) -> None: |
| 40 | """Write schema to cache.""" |
| 41 | self._dir.mkdir(parents=True, exist_ok=True) |
| 42 | path = self._path(version) |
| 43 | path.write_text(json.dumps(schema, ensure_ascii=False), encoding="utf-8") |
| 44 | |
| 45 | def has(self, version: str) -> bool: |
| 46 | """Check if schema is cached for this version.""" |