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

add did resolver in memory cache when none is declared #305

Closed
wants to merge 12 commits into from

Conversation

shamilovtim
Copy link
Member

Currently the Did Resolver Cache defaults to NOOP when none is supplied. This has implications for performance. Instead, provide a basic unpersisted in memory cache for the duration of the web5-js session.

Copy link

codesandbox bot commented Nov 20, 2023

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@shamilovtim shamilovtim modified the milestone: #279 Nov 21, 2023
@shamilovtim shamilovtim linked an issue Nov 21, 2023 that may be closed by this pull request
@shamilovtim
Copy link
Member Author

Depends on #306 to fix the weird typescript flakes

@shamilovtim shamilovtim mentioned this pull request Nov 21, 2023
@shamilovtim shamilovtim self-assigned this Dec 1, 2023
Copy link
Contributor

github-actions bot commented Dec 1, 2023

TBDocs Report

✅ No errors or warnings

@web5/api

  • Project entry file: packages/api/src/index.ts

TBDocs Report Updated at 2023-12-01T20:07:46Z dad73ad

Copy link

codecov bot commented Dec 1, 2023

Codecov Report

Merging #305 (dad73ad) into main (ae975ea) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #305      +/-   ##
==========================================
+ Coverage   91.77%   91.80%   +0.02%     
==========================================
  Files          73       73              
  Lines       15765    15805      +40     
  Branches     1448     1456       +8     
==========================================
+ Hits        14469    14510      +41     
+ Misses       1270     1269       -1     
  Partials       26       26              
Components Coverage Δ
api 96.47% <ø> (-0.23%) ⬇️
common 95.00% <ø> (ø)
credentials 94.32% <ø> (ø)
crypto 100.00% <ø> (ø)
dids 89.10% <100.00%> (+0.34%) ⬆️
agent 88.08% <ø> (ø)
identity-agent 56.81% <ø> (ø)
proxy-agent 58.43% <ø> (ø)
user-agent 55.22% <ø> (ø)

@frankhinek
Copy link
Contributor

Addressed in #445
Documentation included in @web5/identity-agent README that explains how to use an in-memory cache or to substitute for one that works with React Native.
Future PR will move the in-memory DID resolver cache into @web5/dids

@frankhinek frankhinek closed this Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add caching to identity-agent for DID Resolution
2 participants