55
66from .BaseMapper import BaseMapper
77from .retrievers import MutualFundRetriever
8- from .types import KeyToValueSet , cache
8+ from .types import KeyToValueSet
9+ from .utils import with_cache
910
1011
1112class MutualFundMapper (BaseMapper ):
@@ -24,7 +25,7 @@ def __init__(self) -> None:
2425 super ().__init__ (MutualFundMapper ._retriever )
2526
2627 @property # type: ignore
27- @cache
28+ @with_cache
2829 def cik_to_series_ids (self ) -> KeyToValueSet :
2930 """Get CIK to series ID mapping.
3031
@@ -40,7 +41,7 @@ def cik_to_series_ids(self) -> KeyToValueSet:
4041 return self ._form_kv_set_mapping (cik_col , series_id_col )
4142
4243 @property # type: ignore
43- @cache
44+ @with_cache
4445 def ticker_to_series_id (self ) -> Dict [str , str ]:
4546 """Get ticker to series ID mapping.
4647
@@ -56,7 +57,7 @@ def ticker_to_series_id(self) -> Dict[str, str]:
5657 return self ._form_kv_mapping (ticker_col , series_id_col )
5758
5859 @property # type: ignore
59- @cache
60+ @with_cache
6061 def series_id_to_cik (self ) -> Dict [str , str ]:
6162 """Get series ID to CIK mapping.
6263
@@ -72,7 +73,7 @@ def series_id_to_cik(self) -> Dict[str, str]:
7273 return self ._form_kv_mapping (series_id_col , cik_col )
7374
7475 @property # type: ignore
75- @cache
76+ @with_cache
7677 def series_id_to_tickers (self ) -> KeyToValueSet :
7778 """Get series ID to tickers mapping.
7879
@@ -88,7 +89,7 @@ def series_id_to_tickers(self) -> KeyToValueSet:
8889 return self ._form_kv_set_mapping (series_id_col , ticker_col )
8990
9091 @property # type: ignore
91- @cache
92+ @with_cache
9293 def series_id_to_class_ids (self ) -> KeyToValueSet :
9394 """Get series ID to class IDs mapping.
9495
@@ -104,7 +105,7 @@ def series_id_to_class_ids(self) -> KeyToValueSet:
104105 return self ._form_kv_set_mapping (series_id_col , class_id_col )
105106
106107 @property # type: ignore
107- @cache
108+ @with_cache
108109 def ticker_to_class_id (self ) -> Dict [str , str ]:
109110 """Get ticker to class ID mapping.
110111
@@ -120,7 +121,7 @@ def ticker_to_class_id(self) -> Dict[str, str]:
120121 return self ._form_kv_mapping (ticker_col , class_id_col )
121122
122123 @property # type: ignore
123- @cache
124+ @with_cache
124125 def cik_to_class_ids (self ) -> KeyToValueSet :
125126 """Get CIK to class IDs mapping.
126127
@@ -136,7 +137,7 @@ def cik_to_class_ids(self) -> KeyToValueSet:
136137 return self ._form_kv_set_mapping (cik_col , class_id_col )
137138
138139 @property # type: ignore
139- @cache
140+ @with_cache
140141 def class_id_to_cik (self ) -> Dict [str , str ]:
141142 """Get class ID to CIK mapping.
142143
@@ -152,7 +153,7 @@ def class_id_to_cik(self) -> Dict[str, str]:
152153 return self ._form_kv_mapping (class_id_col , cik_col )
153154
154155 @property # type: ignore
155- @cache
156+ @with_cache
156157 def class_id_to_ticker (self ) -> Dict [str , str ]:
157158 """Get class ID to ticker mapping.
158159
0 commit comments