@@ -35,7 +35,7 @@ class CustomMetadataCache:
3535 types_by_asset : dict [str , set [type ]] = dict ()
3636
3737 @classmethod
38- def _refresh_cache (cls ) -> None :
38+ def refresh_cache (cls ) -> None :
3939 from pyatlan .model .core import CustomMetadata , to_snake_case
4040
4141 client = AtlanClient .get_default_client ()
@@ -98,7 +98,7 @@ def get_id_for_name(cls, name: str) -> Optional[str]:
9898 if cm_id := cls .map_name_to_id .get (name ):
9999 return cm_id
100100 # If not found, refresh the cache and look again (could be stale)
101- cls ._refresh_cache ()
101+ cls .refresh_cache ()
102102 return cls .map_name_to_id .get (name )
103103
104104 @classmethod
@@ -109,14 +109,14 @@ def get_name_for_id(cls, idstr: str) -> Optional[str]:
109109 if cm_name := cls .map_id_to_name .get (idstr ):
110110 return cm_name
111111 # If not found, refresh the cache and look again (could be stale)
112- cls ._refresh_cache ()
112+ cls .refresh_cache ()
113113 return cls .map_id_to_name .get (idstr )
114114
115115 @classmethod
116116 def get_type_for_id (cls , idstr : str ) -> Optional [type ]:
117117 if cm_type := cls .map_id_to_type .get (idstr ):
118118 return cm_type
119- cls ._refresh_cache ()
119+ cls .refresh_cache ()
120120 return cls .map_id_to_type .get (idstr )
121121
122122 @classmethod
@@ -129,7 +129,7 @@ def get_all_custom_attributes(
129129 of each of those attributes).
130130 """
131131 if len (cls .cache_by_id ) == 0 or force_refresh :
132- cls ._refresh_cache ()
132+ cls .refresh_cache ()
133133 m = {}
134134 for type_id , cm in cls .cache_by_id .items ():
135135 type_name = cls .get_name_for_id (type_id )
@@ -165,7 +165,7 @@ def get_attr_id_for_name(cls, set_name: str, attr_name: str) -> Optional[str]:
165165 # If found, return straight away
166166 return attr_id
167167 # Otherwise, refresh the cache and look again (could be stale)
168- cls ._refresh_cache ()
168+ cls .refresh_cache ()
169169 if sub_map := cls .map_attr_name_to_id .get (set_id ):
170170 return sub_map .get (attr_name )
171171 return None
@@ -180,7 +180,7 @@ def get_attr_name_for_id(cls, set_id: str, attr_id: str) -> Optional[str]:
180180 attr_name = sub_map .get (attr_id )
181181 if attr_name :
182182 return attr_name
183- cls ._refresh_cache ()
183+ cls .refresh_cache ()
184184 if sub_map := cls .map_attr_id_to_name .get (set_id ):
185185 return sub_map .get (attr_id )
186186 return None
@@ -200,7 +200,7 @@ def get_attributes_for_search_results(cls, set_name: str) -> Optional[list[str]]
200200 if set_id := cls .get_id_for_name (set_name ):
201201 if dot_names := cls ._get_attributes_for_search_results (set_id ):
202202 return dot_names
203- cls ._refresh_cache ()
203+ cls .refresh_cache ()
204204 return cls ._get_attributes_for_search_results (set_id )
205205 return None
206206
0 commit comments