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

Method load_edit_cache

plugin_manager/asset_library_source.cpp:315–330  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

313}
314
315void AssetLibrarySource::load_edit_cache() {
316 MutexLock lock(cache_mutex);
317 String edit_cache_file = PluginManager::get_plugin_cache_path().path_join("asset_lib_edits_release_cache.json");
318 if (!FileAccess::exists(edit_cache_file)) {
319 return;
320 }
321 auto file = FileAccess::open(edit_cache_file, FileAccess::READ);
322 if (file.is_null()) {
323 return;
324 }
325 Dictionary json = JSON::parse_string(file->get_as_text());
326 for (auto &E : json) {
327 edit_cache[E.key] = EditCache::from_json(E.value);
328 }
329 file->close();
330}
331
332void AssetLibrarySource::load_cache_internal() {
333 Error err = load_edit_list_cache();

Callers

nothing calls this directly

Calls 3

from_jsonFunction · 0.85
get_as_textMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected