File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
services/static-webserver/client/source/class/osparc/store Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -165,17 +165,15 @@ qx.Class.define("osparc.store.Services", {
165165 }
166166 } ;
167167 this . __studyServicesPromisesCached [ studyId ] = osparc . data . Resources . fetch ( "studies" , "getServices" , params )
168- /*
169- OM: here
170168 . then ( resp => {
171169 const services = resp [ "services" ] ;
172170 services . forEach ( service => {
171+ // this service information is not complete, keep it in cache anyway
173172 service . version = service [ "release" ] [ "version" ] ;
174173 this . __addServiceToCache ( service ) ;
175174 } ) ;
176175 return resp ;
177176 } )
178- */
179177 . finally ( ( ) => {
180178 delete this . __studyServicesPromisesCached [ studyId ] ;
181179 } ) ;
@@ -390,6 +388,15 @@ qx.Class.define("osparc.store.Services", {
390388 if ( ! ( key in this . __servicesCached ) ) {
391389 this . __servicesCached [ key ] = { } ;
392390 }
391+ // some services that go to the cache are not complete, e.g. study services
392+ // if the one in the cache is the complete one, do not overwrite it
393+ if (
394+ key in this . __servicesCached [ key ] &&
395+ version in this . __servicesCached [ key ] &&
396+ this . __servicesCached [ key ] [ version ] [ "inputs" ]
397+ ) {
398+ return ;
399+ }
393400 this . __servicesCached [ key ] [ version ] = value ;
394401 } ,
395402
You can’t perform that action at this time.
0 commit comments