{"record":{"id":"9378b9c1a4c3c684","repo":"nautechsystems/nautilus_trader","slug":"loading-quote-data-for-redis-cache-adapter-not-sup","errorCode":null,"errorMessage":"Loading quote data for Redis cache adapter not supported","messagePattern":"Loading quote data for Redis cache adapter not supported","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/infrastructure/src/redis/cache.rs","lineNumber":1609,"sourceCode":"        self.database.load_custom_data(data_type)\n    }\n\n    fn load_order_snapshot(\n        &self,\n        _client_order_id: &ClientOrderId,\n    ) -> anyhow::Result<Option<OrderSnapshot>> {\n        anyhow::bail!(\"Loading order snapshots from Redis cache adapter not supported\")\n    }\n\n    fn load_position_snapshot(\n        &self,\n        _position_id: &PositionId,\n    ) -> anyhow::Result<Option<PositionSnapshot>> {\n        anyhow::bail!(\"Loading position snapshots from Redis cache adapter not supported\")\n    }\n\n    fn load_quotes(&self, _instrument_id: &InstrumentId) -> anyhow::Result<Vec<QuoteTick>> {\n        anyhow::bail!(\"Loading quote data for Redis cache adapter not supported\")\n    }\n\n    fn load_trades(&self, _instrument_id: &InstrumentId) -> anyhow::Result<Vec<TradeTick>> {\n        anyhow::bail!(\"Loading market data for Redis cache adapter not supported\")\n    }\n\n    fn load_funding_rates(\n        &self,\n        _instrument_id: &InstrumentId,\n    ) -> anyhow::Result<Vec<FundingRateUpdate>> {\n        anyhow::bail!(\"Loading market data for Redis cache adapter not supported\")\n    }\n\n    fn load_bars(&self, _instrument_id: &InstrumentId) -> anyhow::Result<Vec<Bar>> {\n        anyhow::bail!(\"Loading market data for Redis cache adapter not supported\")\n    }\n\n    fn add(&self, key: String, value: Bytes) -> anyhow::Result<()> {","sourceCodeStart":1591,"sourceCodeEnd":1627,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/infrastructure/src/redis/cache.rs#L1591-L1627","documentation":"load_quotes on the Redis cache adapter is unimplemented and always bails with this message. Historical/market quote data loading is not supported by the Redis-backed cache, which is oriented toward state persistence rather than market data storage.","triggerScenarios":"Calling cache.load_quotes(instrument_id) or running data-replay/restore code paths that read quote ticks from the cache while Redis is the backing adapter.","commonSituations":"Trying to warm up strategies with historical quotes from Redis; scripts that mixed a data catalog with the Redis cache and assumed load_quotes worked on both; backtests ported to live setups where the Redis cache replaced the local cache.","solutions":["Load quotes from a data catalog / Parquet data adapter rather than the Redis cache.","Pipe live QuoteTicks via data clients instead of replaying them from the cache.","Handle the error gracefully (empty vec) when quote replay is optional.","Check adapter capability before invoking market-data load methods."],"exampleFix":"// before\nlet quotes = cache.load_quotes(&instrument_id)?; // bails on Redis\n// after\nlet quotes = match cache.load_quotes(&instrument_id) {\n    Ok(q) => q,\n    Err(_) => Vec::new(), // Redis adapter does not support quote loads\n};","handlingStrategy":"fallback","validationCode":"// Python\nif isinstance(cache_database, RedisCacheDatabase):\n    quotes = []  # unsupported on Redis\nelse:\n    quotes = cache.load_quotes(instrument_id)","typeGuard":null,"tryCatchPattern":"// Python\ntry:\n    quotes = cache.load_quotes(instrument_id)\nexcept RuntimeError as e:\n    if \"quote data\" in str(e) and \"not supported\" in str(e):\n        quotes = []\n    else:\n        raise","preventionTips":["Source historical quotes from a data catalog, not the Redis cache.","Keep market-data loading and state caching concerns in separate adapters.","Audit any cache.load_* call for Redis-adapter support before enabling the code path."],"tags":["redis","cache","not-implemented","market-data"],"backgroundTag":"method-not-implemented","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}