{"record":{"id":"311d46ed4e93720f","repo":"nautechsystems/nautilus_trader","slug":"loading-signals-from-redis-cache-adapter-not-suppo","errorCode":null,"errorMessage":"Loading signals from Redis cache adapter not supported","messagePattern":"Loading signals from Redis cache adapter not supported","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/infrastructure/src/redis/cache.rs","lineNumber":1587,"sourceCode":"            &self.database.trader_key,\n            position_id,\n            self.encoding(),\n        )\n        .await\n    }\n\n    fn load_actor(&self, actor_id: &ActorId) -> anyhow::Result<AHashMap<String, Bytes>> {\n        let key = format!(\"{ACTORS}{REDIS_DELIMITER}{actor_id}{REDIS_DELIMITER}state\");\n        self.load_state(key)\n    }\n\n    fn load_strategy(&self, strategy_id: &StrategyId) -> anyhow::Result<AHashMap<String, Bytes>> {\n        let key = format!(\"{STRATEGIES}{REDIS_DELIMITER}{strategy_id}{REDIS_DELIMITER}state\");\n        self.load_state(key)\n    }\n\n    fn load_signals(&self, _name: &str) -> anyhow::Result<Vec<Signal>> {\n        anyhow::bail!(\"Loading signals from Redis cache adapter not supported\")\n    }\n\n    fn load_custom_data(&self, data_type: &DataType) -> anyhow::Result<Vec<CustomData>> {\n        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\")","sourceCodeStart":1569,"sourceCodeEnd":1605,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/infrastructure/src/redis/cache.rs#L1569-L1605","documentation":"The Redis cache adapter implements load_signals as an explicit bail: it deliberately does not support reading signals back from Redis. Any call to the Cache's load_signals when backed by this adapter returns this error unconditionally. Signals are expected to be persisted/loaded through other backends.","triggerScenarios":"Calling cache.load_signals(name) (directly or via strategies/workflows that restore state on startup) while the cache database is the Redis adapter.","commonSituations":"Live/trading runs configured with the Redis cache attempting signal replay on restart; switching a backtest script that relied on in-memory or another adapter to Redis and expecting load_signals to work; recovery workflows assuming full state restore.","solutions":["Use a different backing store (e.g. PostgreSQL/postgres cache adapter) for signal persistence and loading.","Restructure the workflow so signals are regenerated or passed in-process rather than reloaded from Redis.","Catch the error and treat it as 'no signals available' if signal replay is optional for your run.","Track the adapter's feature support and feature-gate signal loading code paths."],"exampleFix":"// before\nlet signals = cache.load_signals(\"my_strategy\")?; // bails on Redis\n// after\nlet signals = cache.load_signals(\"my_strategy\").unwrap_or_default(); // tolerate unsupported load","handlingStrategy":"fallback","validationCode":"// Python\nif isinstance(cache_database, RedisCacheDatabase):\n    signals = []  # Redis adapter cannot load signals\nelse:\n    signals = cache.load_signals(name)","typeGuard":null,"tryCatchPattern":"// Python\ntry:\n    signals = cache.load_signals(name)\nexcept RuntimeError as e:\n    if \"not supported\" in str(e) and \"signals\" in str(e):\n        signals = []\n    else:\n        raise","preventionTips":["Do not rely on Redis cache for signal persistence; use a data catalog or postgres adapter.","Feature-gate signal-replay code paths by backend capability.","Document adapter limitations in deployment configs."],"tags":["redis","cache","not-implemented","signals"],"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"}