mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-15 20:31:43 +00:00
Reduce caching to 5min to speed up UI refreshes in case of open orders.
This commit is contained in:
@@ -121,11 +121,12 @@ class Exchange:
|
||||
# Cache for 10 minutes ...
|
||||
self._cache_lock = Lock()
|
||||
self._fetch_tickers_cache: TTLCache = TTLCache(maxsize=2, ttl=60 * 10)
|
||||
# Cache values for 1800 to avoid frequent polling of the exchange for prices
|
||||
# Cache values for 300 to avoid frequent polling of the exchange for prices
|
||||
# Caching only applies to RPC methods, so prices for open trades are still
|
||||
# refreshed once every iteration.
|
||||
self._exit_rate_cache: TTLCache = TTLCache(maxsize=100, ttl=1800)
|
||||
self._entry_rate_cache: TTLCache = TTLCache(maxsize=100, ttl=1800)
|
||||
# Shouldn't be too high either, as it'll freeze UI updates in case of open orders.
|
||||
self._exit_rate_cache: TTLCache = TTLCache(maxsize=100, ttl=300)
|
||||
self._entry_rate_cache: TTLCache = TTLCache(maxsize=100, ttl=300)
|
||||
|
||||
# Holds candles
|
||||
self._klines: Dict[PairWithTimeframe, DataFrame] = {}
|
||||
|
||||
Reference in New Issue
Block a user