MCPcopy Create free account
hub / github.com/ZyphrZero/z.ai2api_python / _should_use_cache

Function _should_use_cache

app/utils/fe_version.py:53–61  ·  view source on GitHub ↗

Determine whether the cached value can be reused.

(force_refresh: bool)

Source from the content-addressed store, hash-verified

51
52
53def _should_use_cache(force_refresh: bool) -> bool:
54 """Determine whether the cached value can be reused."""
55 if force_refresh:
56 return False
57 if not _cached_version:
58 return False
59 if _cached_at <= 0:
60 return False
61 return (time.time() - _cached_at) < CACHE_TTL_SECONDS
62
63
64def get_latest_fe_version(force_refresh: bool = False) -> str:

Callers 1

get_latest_fe_versionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected