MCPcopy Create free account
hub / github.com/KingOfBugbounty/enumrust / write_cache

Function write_cache

src/update_checker.rs:56–64  ·  view source on GitHub ↗

Write version to cache

(version: &str)

Source from the content-addressed store, hash-verified

54
55/// Write version to cache
56fn write_cache(version: &str) {
57 let cache = UpdateCache {
58 last_check: now_secs(),
59 latest_version: version.to_string(),
60 };
61 if let Ok(json) = serde_json::to_string(&cache) {
62 let _ = std::fs::write(cache_path(), json);
63 }
64}
65
66/// Fetch latest version from GitHub API
67async fn fetch_latest_version() -> Option<String> {

Callers 2

check_and_updateFunction · 0.85
check_and_update_forceFunction · 0.85

Calls 2

now_secsFunction · 0.85
cache_pathFunction · 0.85

Tested by

no test coverage detected