Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions folder_paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,15 @@ def set_user_directory(user_dir: str) -> None:
user_directory = user_dir


def clear_filename_list_cache() -> None:
"""
Clear cached filename lists so new files on disk are discovered.
"""
global filename_list_cache
filename_list_cache.clear()
cache_helper.clear()


# System User Protection - Protects system directories from HTTP endpoint access
# System Users are internal-only users that cannot be accessed via HTTP endpoints.
# They use the '__' prefix convention (similar to Python's private member convention).
Expand Down
1 change: 1 addition & 0 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,7 @@ def node_info(node_class):

@routes.get("/object_info")
async def get_object_info(request):
folder_paths.clear_filename_list_cache()
with folder_paths.cache_helper:
out = {}
for x in nodes.NODE_CLASS_MAPPINGS:
Expand Down