toss / suspensive

Manage asynchronous operations, timing, error handling and detecting intersection of elements easily (one of TanStack Query's community resources)
https://suspensive.org
MIT License
528 stars 51 forks source link

feat(cache): add CacheStore, useCacheStore, CacheStoreProvider, useCache, Cache, cacheOptions #1083

Closed SEOKKAMONI closed 3 months ago

SEOKKAMONI commented 3 months ago

Overview

close https://github.com/toss/suspensive/issues/1082

Why was the name changed from @suspensive/promise to @suspensive/cache?

The reason for changing the name to @suspensive/cache is that the ultimate goal of @suspensive/cache is to provide an interface for caching various elements. Therefore, we believed that @suspensive/cache is a more suitable package name for this purpose.

PR Checklist

  1. I read the Contributing Guide
  2. I added documents and tests.
changeset-bot[bot] commented 3 months ago

🦋 Changeset detected

Latest commit: 9abf036342aabbea9be41e94d63fbdc9a028a512

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ----------------- | ----- | | @suspensive/cache | Minor |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

vercel[bot] commented 3 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
suspensive.org ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 15, 2024 0:47am
v1.suspensive.org ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 15, 2024 0:47am
visualization.suspensive.org ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 15, 2024 0:47am
vercel[bot] commented 3 months ago

@SEOKKAMONI is attempting to deploy a commit to the Toss Team on Vercel.

A member of the Team first needs to authorize it.

codecov-commenter commented 3 months ago

Codecov Report

Attention: Patch coverage is 98.16514% with 2 lines in your changes missing coverage. Please review.

Project coverage is 86.51%. Comparing base (6cae782) to head (9abf036).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/toss/suspensive/pull/1083/graphs/tree.svg?width=650&height=150&src=pr&token=5PopssACmx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toss)](https://app.codecov.io/gh/toss/suspensive/pull/1083?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toss) ```diff @@ Coverage Diff @@ ## main #1083 +/- ## ========================================== + Coverage 84.23% 86.51% +2.27% ========================================== Files 54 62 +8 Lines 552 660 +108 Branches 118 139 +21 ========================================== + Hits 465 571 +106 - Misses 82 84 +2 Partials 5 5 ``` | [Components](https://app.codecov.io/gh/toss/suspensive/pull/1083/components?src=pr&el=components&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toss) | Coverage Δ | | |---|---|---| | [@suspensive/react](https://app.codecov.io/gh/toss/suspensive/pull/1083/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toss) | `97.05% <ø> (ø)` | | | [@suspensive/react-query](https://app.codecov.io/gh/toss/suspensive/pull/1083/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toss) | `75.28% <ø> (ø)` | | | [@suspensive/react-query-4](https://app.codecov.io/gh/toss/suspensive/pull/1083/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toss) | `0.00% <ø> (ø)` | | | [@suspensive/react-query-5](https://app.codecov.io/gh/toss/suspensive/pull/1083/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toss) | `0.00% <ø> (ø)` | | | [@suspensive/jotai](https://app.codecov.io/gh/toss/suspensive/pull/1083/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toss) | `0.00% <ø> (ø)` | | | [@suspensive/cache](https://app.codecov.io/gh/toss/suspensive/pull/1083/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toss) | `98.16% <98.16%> (-1.84%)` | :arrow_down: | | [@suspensive/react-await](https://app.codecov.io/gh/toss/suspensive/pull/1083/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toss) | `100.00% <ø> (ø)` | | | [@suspensive/react-image](https://app.codecov.io/gh/toss/suspensive/pull/1083/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toss) | `80.39% <ø> (ø)` | |
codspeed-hq[bot] commented 3 months ago

CodSpeed Performance Report

Merging #1083 will create unknown performance changes

Comparing SEOKKAMONI:feat/cache (9abf036) with main (6cae782)

Summary

:warning: No benchmarks were detected in both the base of the PR and the PR.

manudeli commented 3 months ago

7ccffd9 I made commit in this branch check it out please.