gbv/cocoda-sdk

`registryForScheme`: Use a cache for initialized registries

Closed this issue · 0 comments

If two schemes use the same API, they should also be assigned the same registry object so that the initialization of that registry (which involved making a request to its /status endpoint) is not performed multiple times. See also the implementation in BARTOC (which should be replaced by this): https://github.com/gbv/bartoc.org/blob/main/vue/utils.js

  • Implement the caching
  • Make sure schemes that belong to the same registry are all in the registry's _api.schemes field (this was a recent bug in BARTOC)