Skip to content

Commit 6c798f2

Browse files
committed
cached env config
1 parent 1e7f306 commit 6c798f2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pyiceberg/utils/config.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
# under the License.
1717
import logging
1818
import os
19+
from functools import lru_cache
1920

2021
import strictyaml
2122

@@ -179,3 +180,8 @@ def get_bool(self, key: str) -> bool | None:
179180
except ValueError as err:
180181
raise ValueError(f"{key} should be a boolean or left unset. Current value: {val}") from err
181182
return None
183+
184+
185+
@lru_cache(maxsize=1)
186+
def get_env_config() -> Config:
187+
return Config()

0 commit comments

Comments
 (0)