读取本地缓存文件,不存在则返回 None。
(group: str)
| 132 | |
| 133 | |
| 134 | def _read_cache(group: str) -> Optional[str]: |
| 135 | """读取本地缓存文件,不存在则返回 None。""" |
| 136 | cache_file = _cache_path(group) |
| 137 | if cache_file.exists(): |
| 138 | return cache_file.read_text(encoding="utf-8") |
| 139 | return None |
| 140 | |
| 141 | |
| 142 | def _cache_is_fresh(group: str) -> bool: |
no test coverage detected