Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a LRU cache for resolved DidDocuments #3645

Closed
paullatzelsperger opened this issue Nov 23, 2023 · 0 comments · Fixed by #3651
Closed

Create a LRU cache for resolved DidDocuments #3645

paullatzelsperger opened this issue Nov 23, 2023 · 0 comments · Fixed by #3651
Assignees
Labels
dcp feature_request New feature request, awaiting triage

Comments

@paullatzelsperger
Copy link
Member

Feature Request

In the context of IATP, many things are based on DID documents, such as resolving key material, resolving service URLs (e.g. for the CredentialService), and possibly others.

In order to decrease the amount of network calls to resolve the DID document, we will implement a LRU cache, that the DidResolverRegistry uses.

Which Areas Would Be Affected?

identity-did-core

Why Is the Feature Desired?

Not all of the operations that require information extracted from a DID are done in the same place, and tunneling the did document through everywhere would introduce weird and incorrect dependencies in SPI modules.

Solution Proposal

Create a LRU cache based on a LinkedHashmap, cache DID documents, as it is safe to assume, that a DID document will be used multiple times in close temporal vicinity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dcp feature_request New feature request, awaiting triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant