Skip to content

Commit

Permalink
Merge pull request #51 from christoph-blessing/cache_created_tables
Browse files Browse the repository at this point in the history
Cache created tables
  • Loading branch information
christoph-blessing authored Oct 10, 2023
2 parents 3164276 + 3578c28 commit 705da2d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions link/infrastructure/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ def create_dj_table_factory( # noqa: PLR0913
if context is None:
context = {}

@functools.lru_cache(maxsize=None)
def create_dj_table() -> dj.Table:
spawned_table_classes: dict[str, type[dj.Table]] = {}
schema_factory().spawn_missing_classes(context=spawned_table_classes)
Expand Down

0 comments on commit 705da2d

Please sign in to comment.