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

Method save_edit_cache

plugin_manager/asset_library_source.cpp:358–374  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

356}
357
358void AssetLibrarySource::save_edit_cache() {
359 MutexLock lock(cache_mutex);
360 String edit_cache_file = PluginManager::get_plugin_cache_path().path_join("asset_lib_edits_release_cache.json");
361 gdre::ensure_dir(edit_cache_file.get_base_dir());
362 auto file = FileAccess::open(edit_cache_file, FileAccess::WRITE);
363 if (file.is_null()) {
364 return;
365 }
366
367 Dictionary json;
368 for (auto &E : edit_cache) {
369 json[E.key] = E.value.to_json();
370 }
371 file->store_string(JSON::stringify(json));
372 file->close();
373 json.clear();
374}
375
376void AssetLibrarySource::save_cache() {
377 save_edit_list_cache();

Callers

nothing calls this directly

Calls 3

to_jsonMethod · 0.45
closeMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected