MCPcopy Create free account
hub / github.com/Tong89/smartNode / _read_cache

Function _read_cache

backend/physics/tle_source.py:134–139  ·  view source on GitHub ↗

读取本地缓存文件,不存在则返回 None。

(group: str)

Source from the content-addressed store, hash-verified

132
133
134def _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
142def _cache_is_fresh(group: str) -> bool:

Callers 2

fetch_groupFunction · 0.85
fetch_by_catnrFunction · 0.85

Calls 1

_cache_pathFunction · 0.85

Tested by

no test coverage detected