add comment
This commit is contained in:
		
					parent
					
						
							
								cdcb1b13da
							
						
					
				
			
			
				commit
				
					
						d473b44556
					
				
			
		
					 2 changed files with 6 additions and 1 deletions
				
			
		|  | @ -74,10 +74,15 @@ where | |||
|         return res.map(wrap_incoming_body_response::<BoxBody>); | ||||
|       }; | ||||
|       let (parts, body) = res.unwrap().into_parts(); | ||||
| 
 | ||||
|       let Ok(bytes) = body.collect().await.map(|v| v.to_bytes()) else { | ||||
|         return Err(RpxyError::FailedToWriteByteBufferForCache); | ||||
|       }; | ||||
| 
 | ||||
|       // TODO: this is inefficient. needs to be reconsidered to avoid unnecessary copy and should spawn async task to store cache.
 | ||||
|       // We may need to use the same logic as h3.
 | ||||
|       // Is bytes.clone() enough?
 | ||||
| 
 | ||||
|       // if let Err(cache_err) = self
 | ||||
|       //   .cache
 | ||||
|       //   .as_ref()
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Jun Kurihara
				Jun Kurihara