pyld icon indicating copy to clipboard operation
pyld copied to clipboard

Add ContextResolver docs.

Open davidlehn opened this issue 4 years ago • 3 comments

The README needs ContextResolver docs. Perhaps similar to: https://github.com/digitalbazaar/pyld/pull/112#issuecomment-606897734

cc: @gkellogg @azaroth42

davidlehn avatar Apr 13 '20 04:04 davidlehn

That comment demonstrates how to customize it, but because the cache is generated in the module, it works by default without any changes to code (which is great!).

(which is not to say the docs aren't needed, just that they should be clear that you only need to do that if you want to change the default behavior)

azaroth42 avatar Apr 13 '20 14:04 azaroth42

Presumably, jsonld.js could use the same documentation.

BTW, I know @dlongley thought the tag aspect important; the only thing in either repo that would seem to be able to affect this is the 'tag': 'static' done within the ContextResolver itself. Perhaps something got lost or is needed in the document loader, but it's not clear how or why this would be used.

gkellogg avatar Apr 13 '20 17:04 gkellogg

Hi @gkellogg

Indeed, the usage of tag fetched from a remote context is not clear. No mention of this field in JSON-LD 1.0/1.1 specifications.

In our case, this leads to very poor performance. As the shared_cache is never populated we fetch remote contexts every times.

yesteph avatar Dec 20 '22 15:12 yesteph