| 356 | } |
| 357 | |
| 358 | void 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 | |
| 376 | void AssetLibrarySource::save_cache() { |
| 377 | save_edit_list_cache(); |