FraunhoferCESE / madcap-analysis

Apache License 2.0
0 stars 1 forks source link

Ensure cached data is loaded in sequence of database requests when multiple load requests are made #117

Closed StefanFCMD closed 7 years ago

llayman commented 7 years ago

that has something to do with the sequential load order. When you change the date for example while a view was still loading data for the date before, that broke the app some time ago. Since all requests for one view take approximately the same time, I reordered the loading so that if multiple dates are loading at the same time, the last one will get shown, since it would have to be the last one requested if they all take the same time. However, I didn't considered that loading from the cache is much faster than from the database, therefore, the data from the dtabase request will get shown currently since it's the last one running, even if the request from the cache was the last request.

It only occurs when you request new data while the old one is still loading. Most of the time the data loads so fast that you can't even choose a new date before it finished loading.

StefanFCMD commented 7 years ago

Corrected for the map view. Also, caching has to be disabled for aborted loads