mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-17 01:14:35 +08:00
add lru
This commit is contained in:
committed by
you-n-g
parent
25f54ddaeb
commit
7ee4a207bc
@@ -158,6 +158,7 @@ class CN1min_NumpyQuote(BaseQuote):
|
|||||||
def get_all_stock(self):
|
def get_all_stock(self):
|
||||||
return self.data.keys()
|
return self.data.keys()
|
||||||
|
|
||||||
|
@lru_cache(maxsize=512)
|
||||||
def get_data(self, stock_id, start_time, end_time, fields=None, method=None):
|
def get_data(self, stock_id, start_time, end_time, fields=None, method=None):
|
||||||
if fields is None and method is not None:
|
if fields is None and method is not None:
|
||||||
raise ValueError(f"method must be None when fields is None")
|
raise ValueError(f"method must be None when fields is None")
|
||||||
|
|||||||
Reference in New Issue
Block a user