{"record":{"id":"1da15d91e0a899e5","repo":"nautechsystems/nautilus_trader","slug":"loading-order-snapshots-from-redis-cache-adapter-n","errorCode":null,"errorMessage":"Loading order snapshots from Redis cache adapter not supported","messagePattern":"Loading order snapshots from Redis cache adapter not supported","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/infrastructure/src/redis/cache.rs","lineNumber":1598,"sourceCode":"\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\")\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(","sourceCodeStart":1580,"sourceCodeEnd":1616,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/infrastructure/src/redis/cache.rs#L1580-L1616","documentation":"load_order_snapshot is an intentionally unimplemented method on the Redis cache adapter; it always bails with this message. Order snapshots cannot be read back from the Redis-backed cache, so any code path requesting one will fail immediately.","triggerScenarios":"Calling cache.load_order_snapshot(client_order_id) (or flows that reconstruct order snapshots from cache) while using the Redis cache adapter.","commonSituations":"Reconciliation or recovery logic that expects snapshot restore from Redis; migration scripts reading historical orders as snapshots; adapting code written for adapters that do implement snapshot loading.","solutions":["Reconstruct order state via load_order / index-based loads instead of load_order_snapshot.","Use a backing adapter that implements snapshot loading if snapshots are required.","Handle the error explicitly, returning None semantics in calling code when the adapter cannot provide snapshots.","Feature-gate snapshot restore so it only runs with a capable cache backend."],"exampleFix":"// before\nlet snapshot = cache.load_order_snapshot(&client_order_id)?; // bails on Redis\n// after\nlet snapshot = cache.load_order_snapshot(&client_order_id).ok().flatten(); // graceful degrade","handlingStrategy":"fallback","validationCode":"// Python\nif isinstance(cache_database, RedisCacheDatabase):\n    snapshot = None  # unsupported on Redis\nelse:\n    snapshot = cache.load_order_snapshot(client_order_id)","typeGuard":null,"tryCatchPattern":"// Python\ntry:\n    snapshot = cache.load_order_snapshot(client_order_id)\nexcept RuntimeError as e:\n    if \"order snapshot\" in str(e) and \"not supported\" in str(e):\n        snapshot = None\n    else:\n        raise","preventionTips":["Rebuild order state from load_order/indexes rather than snapshots on Redis.","Check adapter docs for supported load_* methods before designing recovery flows.","Wrap snapshot loads so None is the fallback, never a crash."],"tags":["redis","cache","not-implemented","order-snapshot"],"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-14T05:17:10.506Z"}