BacktestingDataSource.ClearCache
method · BacktestingDataSource · cAlgo.API Since 5.3
DesktopCLICloud
Clears cached price data of current data source if not being used.
Environment behaviour
CLI — not supported. Available to plugins only, and plugins cannot run in the CLI.
Cloud — not supported. Available to plugins only, and plugins cannot run in the cloud.
Definition
bool ClearCache()
backtestingDataSource.ClearCache() -> bool
Returns bool — True if succeeded otherwise False.
Examples
foreach (var dataSource in Backtesting.DataSources)
Print("Cache of {0} cleared: {1}", dataSource.Name, dataSource.ClearCache());
for dataSource in api.Backtesting.DataSources:
api.Print(f"Cache of {dataSource.Name} cleared: {dataSource.ClearCache()}")