Clear both actions caches when config file is reloaded

This commit is contained in:
Kovid Goyal 2022-09-26 20:15:08 +05:30
parent 901e00cab1
commit 921ac12e90
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 7 additions and 2 deletions

View File

@ -2212,8 +2212,8 @@ class Boss:
if bad_lines:
self.show_bad_config_lines(bad_lines)
self.apply_new_options(opts)
from .open_actions import load_open_actions
load_open_actions.clear_cached()
from .open_actions import clear_caches
clear_caches()
def safe_delete_temp_file(self, path: str) -> None:
if is_path_in_temp_dir(path):

View File

@ -221,6 +221,11 @@ def load_launch_actions() -> Tuple[OpenAction, ...]:
return tuple(parse(f))
def clear_caches() -> None:
load_open_actions.clear_cached()
load_launch_actions.clear_cached()
@run_once
def default_open_actions() -> Tuple[OpenAction, ...]:
return tuple(parse('''\