File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -336,7 +336,11 @@ async fn get_connection(
336336) -> Result < Arc < Connection > , PicaError > {
337337 let connection = cache
338338 . get_or_insert_with_filter (
339- & ( access. ownership . id . clone ( ) , connection_key. clone ( ) ) ,
339+ & ( access. ownership . id . clone ( ) . to_string ( )
340+ + connection_key. clone ( ) . to_str ( ) . map_err ( |e| {
341+ tracing:: error!( "Error converting connection key to string: {e}" ) ;
342+ ApplicationError :: bad_request ( "Invalid connection key header" , None )
343+ } ) ?) ,
340344 stores. connection . clone ( ) ,
341345 doc ! {
342346 "key" : connection_key. to_str( ) . map_err( |_| {
Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ where
141141}
142142
143143type ConnectionModelSchemaKey = ( Arc < str > , Arc < str > ) ;
144- type ConnectionHeaderKey = ( Arc < str > , HeaderValue ) ;
144+ // type ConnectionHeaderKey = (Arc<str>, HeaderValue);
145145type ConnectionKey = Arc < str > ;
146146
147147pub type EventAccessCache = GenericCache < HeaderValue , EventAccess > ;
@@ -152,6 +152,6 @@ pub type ConnectionModelDefinitionDestinationCache =
152152 GenericCache < Destination , ConnectionModelDefinition > ;
153153pub type ConnectionModelDefinitionCacheIdKey = GenericCache < Id , ConnectionModelDefinition > ;
154154pub type ConnectionDefinitionCache = GenericCache < Id , ConnectionDefinition > ;
155- pub type ConnectionHeaderCache = GenericCache < ConnectionHeaderKey , Connection > ;
155+ pub type ConnectionHeaderCache = GenericCache < String , Connection > ;
156156pub type ConnectionCache = GenericCache < ConnectionKey , Connection > ;
157157pub type ConnectionModelDefinitionCacheStringKey = GenericCache < String , Option < SparseCMD > > ;
You can’t perform that action at this time.
0 commit comments