This makes the related genes kit more robust to network connection loss, and reduces reliance on third-party services.
Previously, related genes ideogram would fail to complete its first initialization on a given page load, if:
the user were offline, or
MyGene.info or Ensembl or WikiPathways were down
Now, the related genes kit always uses data from its service worker cache. This means third-party APIs are no longer called at run-time for end users; only occasionally at cache-build-time by Ideogram developers. This reduces load on upstream bioinformatics API servers, and makes it easier to develop the related genes kit while e.g. on a train.
Coverage increased (+1.06%) to 86.645% when pulling 84963c7c48bc37c69ff927e7441f782fff5a5073 on offline-cache into 9a5d4cc9ffda2bd670395bbe7543c39600b302be on master.
This makes the related genes kit more robust to network connection loss, and reduces reliance on third-party services.
Previously, related genes ideogram would fail to complete its first initialization on a given page load, if:
Now, the related genes kit always uses data from its service worker cache. This means third-party APIs are no longer called at run-time for end users; only occasionally at cache-build-time by Ideogram developers. This reduces load on upstream bioinformatics API servers, and makes it easier to develop the related genes kit while e.g. on a train.
Web workers were investigated as part of this, but shelved due to an issue in Webpack (https://github.com/webpack/webpack/discussions/14066).
This also substantially refactors service worker caches to consolidate redundant code and improve commentary.