Data Cache
As of version 1.4.22, data caching is introduced in order to reduce the time required to run multiple backtests/permutations.
The data caching will store the requested datasource_topic
and candle_topic
data in your local machine.
By default, this functionality is opted out.
This functionality can be accessed by passing in the cache_path
parameter in RuntimeConfig
prior to starting a backtest.
The cache_path
field accepts a str
value that is just the path to the cache directory.
For an example:
config = RuntimeConfig(
...
cache_path: "Users/me/cache_directory",
...
)
or even
config = RuntimeConfig(
...
cache_path: "./CACHE_DIR",
...
)
)
The data will be fetched once and stored in the provided directory path. If no data is found in the directory provided, a new caching process will begin. Take note as this could use up significant disk space!