MCPcopy Create free account
hub / github.com/GDRETools/gdsdecomp / _save_release_cache

Method _save_release_cache

plugin_manager/github_source.cpp:378–391  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

376}
377
378void GitHubSource::_save_release_cache() {
379 MutexLock lock(cache_mutex);
380 auto file = _get_release_cache_file_name();
381 gdre::ensure_dir(file.get_base_dir());
382 auto fa = FileAccess::open(file, FileAccess::WRITE);
383 ERR_FAIL_COND_MSG(fa.is_null(), "Failed to open file for writing: " + file);
384 Dictionary d;
385 for (auto &E : release_cache) {
386 d[E.key] = E.value.to_json();
387 }
388 fa->store_string(JSON::stringify(d, " ", false, true));
389 fa->flush();
390 d.clear();
391}
392
393void GitHubSource::save_cache() {
394 _save_release_cache();

Callers

nothing calls this directly

Calls 3

to_jsonMethod · 0.45
flushMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected