@@ -40,7 +40,7 @@ qx.Class.define("osparc.store.Services", {
4040 this . __addExtraTypeInfos ( servicesObj ) ;
4141
4242 Object . values ( servicesObj ) . forEach ( serviceKey => {
43- Object . values ( serviceKey ) . forEach ( service => this . __addToCache ( service ) ) ;
43+ Object . values ( serviceKey ) . forEach ( service => this . __addServiceToCache ( service ) ) ;
4444 } ) ;
4545
4646 resolve ( servicesObj ) ;
@@ -127,12 +127,12 @@ qx.Class.define("osparc.store.Services", {
127127 this . __addHit ( service ) ;
128128 this . __addTSRInfo ( service ) ;
129129 this . __addExtraTypeInfo ( service ) ;
130- this . __addToCache ( service )
130+ this . __addServiceToCache ( service )
131131 resolve ( service ) ;
132132 } )
133133 . catch ( err => {
134134 // store it in cache to avoid asking again
135- this . __servicesCached [ key ] [ version ] = null ;
135+ this . __addToCache ( key , version , null ) ;
136136 console . error ( err ) ;
137137 reject ( ) ;
138138 } )
@@ -340,13 +340,17 @@ qx.Class.define("osparc.store.Services", {
340340 return this . getLatest ( "simcore/services/frontend/iterator-consumer/probe/" + type ) ;
341341 } ,
342342
343- __addToCache : function ( service ) {
343+ __addServiceToCache : function ( service ) {
344344 const key = service . key ;
345345 const version = service . version ;
346+ this . __addToCache ( key , version , service ) ;
347+ } ,
348+
349+ __addToCache : function ( key , version , value ) {
346350 if ( ! ( key in this . __servicesCached ) ) {
347351 this . __servicesCached [ key ] = { } ;
348352 }
349- this . __servicesCached [ key ] [ version ] = service ;
353+ this . __servicesCached [ key ] [ version ] = value ;
350354 } ,
351355
352356 __isInCache : function ( key , version ) {
0 commit comments