Skip to content
Merged
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
5 changes: 4 additions & 1 deletion ovos_workshop/resource_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -800,6 +800,9 @@ def __init__(self, skill_directory: str,
self.types = self._define_resource_types()
self._dialog_renderer = dialog_renderer
self.static = dict()
# (directories, file signature, vocabularies, last check) of the last
# _locale_vocabularies() call, see there
self._vocabularies_memo: Optional[tuple] = None

@property
def dialog_renderer(self) -> MustacheDialogRenderer:
Expand Down Expand Up @@ -939,7 +942,7 @@ def _locale_vocabularies(self) -> Dict[str, List[str]]:
vocab_type = self.types.vocabulary
cacheable = not vocab_type.user_directory
if cacheable:
memo = getattr(self, "_vocabularies_memo", None)
memo = self._vocabularies_memo
if memo is not None and memo[0] == (vocab_type.base_directory,
vocab_type.workshop_directory) \
and _still_fresh(memo[1], memo[3]):
Expand Down
Loading