This commit is contained in:
space-nuko 2023-05-14 17:50:41 -05:00
parent 6ff500cac8
commit ba6d6de2ae
2 changed files with 7 additions and 17 deletions

View File

@ -139,21 +139,12 @@ def get_full_path(folder_name, filename):
return full_path
path_cache_dict = {}
def clear_cache():
global path_cache_dict
path_cache_dict = {}
def get_filename_list(folder_name):
global folder_names_and_paths, path_cache_dict
print("RecursiveWalk! " + folder_name)
if folder_name not in path_cache_dict:
output_list = set()
folders = folder_names_and_paths[folder_name]
for x in folders[0]:
output_list.update(filter_files_extensions(recursive_search(x), folders[1]))
path_cache_dict[folder_name] = sorted(list(output_list))
global folder_names_and_paths
output_list = set()
folders = folder_names_and_paths[folder_name]
for x in folders[0]:
output_list.update(filter_files_extensions(recursive_search(x), folders[1]))
return sorted(list(output_list))
return path_cache_dict[folder_name]

View File

@ -264,7 +264,6 @@ class PromptServer():
@routes.get("/object_info")
async def get_object_info(request):
out = {}
folder_paths.clear_cache()
for x in nodes.NODE_CLASS_MAPPINGS:
obj_class = nodes.NODE_CLASS_MAPPINGS[x]
info = {}