epicweb-dev / cachified

🤑 wrap virtually everything that can store by key to act as cache with ttl/max-age, stale-while-validate, parallel fetch protection and type-safety support
MIT License
916 stars 26 forks source link

Context for getFreshValue #26

Closed Xiphe closed 1 year ago

Xiphe commented 1 year ago

Pre-released as cachified@3.1.0-context-info.1

Introduces context which is passed to getFreshValue

context looks like this:

codecov-commenter commented 1 year ago

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage :thumbsup:

Coverage data is based on head (51d9267) compared to base (fa175f5). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #26 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 10 10 Lines 370 372 +2 Branches 118 118 ========================================= + Hits 370 372 +2 ``` | [Impacted Files](https://codecov.io/gh/Xiphe/cachified/pull/26?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Hannes+Diercks) | Coverage Δ | | |---|---|---| | [src/common.ts](https://codecov.io/gh/Xiphe/cachified/pull/26?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Hannes+Diercks#diff-c3JjL2NvbW1vbi50cw==) | `100.00% <ø> (ø)` | | | [src/getCachedValue.ts](https://codecov.io/gh/Xiphe/cachified/pull/26?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Hannes+Diercks#diff-c3JjL2dldENhY2hlZFZhbHVlLnRz) | `100.00% <100.00%> (ø)` | | | [src/getFreshValue.ts](https://codecov.io/gh/Xiphe/cachified/pull/26?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Hannes+Diercks#diff-c3JjL2dldEZyZXNoVmFsdWUudHM=) | `100.00% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Hannes+Diercks). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Hannes+Diercks)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

github-actions[bot] commented 1 year ago

:tada: This PR is included in version 3.1.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: