-
Notifications
You must be signed in to change notification settings - Fork 57
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 TTL Cache to @web5/common
package
#415
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is cool. Should we include an example somewhere of how to use it with our resolver?
Absolutely. Was planning on adding the example usage in But also happy to add somewhere else if you had a thought here. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #415 +/- ##
==========================================
+ Coverage 93.33% 93.38% +0.04%
==========================================
Files 79 80 +1
Lines 23802 23778 -24
Branches 1890 1894 +4
==========================================
- Hits 22215 22204 -11
+ Misses 1547 1534 -13
Partials 40 40
|
TBDocs Report 🛑 Errors: 0 @web5/api
@web5/crypto
@web5/crypto-aws-kms
@web5/dids
TBDocs Report Updated at 2024-02-17T11:48:16Z |
Signed-off-by: Frank Hinek <[email protected]>
Signed-off-by: Frank Hinek <[email protected]>
5734a76
to
c96ca44
Compare
* Add TTL Cache to common package --------- Signed-off-by: Frank Hinek <[email protected]>
* Add TTL Cache to common package --------- Signed-off-by: Frank Hinek <[email protected]>
* Add TTL Cache to common package --------- Signed-off-by: Frank Hinek <[email protected]>
This PR will:
25.2 KB
unpacked), well used (> 500K weekly downloads), TypeScript TTL Cache to the@web5/common
package.@web5/common
to0.2.4
so that the package can be published and consumed by other Web5 packages.Context
This cache can be used as an in-memory TTL cache option for other Web5 packages such as
@web5/dids
(e.g.,DidResolver
),@web5/agent
, etc. Adding to thecommon
package to ensure consistent use across packages.