Get a mutable reference to a graph in the cache
(&self, name: &str)
| 359 | |
| 360 | /// Get a mutable reference to a graph in the cache |
| 361 | pub fn get_graph_mut(&self, name: &str) -> Result<Option<GraphCache>, StorageError> { |
| 362 | // First ensure the graph is in the cache |
| 363 | if self.cache.get_graph(name)?.is_none() { |
| 364 | // Try to load it |
| 365 | if let Some(graph) = self.get_graph(name)? { |
| 366 | self.cache.add_graph(name.to_string(), graph)?; |
| 367 | } |
| 368 | } |
| 369 | |
| 370 | self.cache.get_graph_mut(name) |
| 371 | } |
| 372 | |
| 373 | /// Get access to the storage driver for metrics collection |
| 374 | pub fn get_storage_driver( |