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

Async cache won't store exceptions #258

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

akmalviya03
Copy link

@akmalviya03 akmalviya03 commented Dec 5, 2023

Earlier async cache was caching exceptions.
With new changes in fetch method of AsyncCache class will no longer store exception.
By default AsyncCache will store exception, by setting _canCacheException to false. It won't store exception.

Please refer #257 for video demo of both issue and solution along with minimal reproducible code.


  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.

Copy link

google-cla bot commented Dec 5, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@kevmoo kevmoo requested a review from lrhn December 9, 2023 05:10
lib/src/async_cache.dart Outdated Show resolved Hide resolved
lib/src/async_cache.dart Outdated Show resolved Hide resolved
lib/src/async_cache.dart Outdated Show resolved Hide resolved
lib/src/async_cache.dart Outdated Show resolved Hide resolved
lib/src/async_cache.dart Outdated Show resolved Hide resolved
lib/src/async_cache.dart Outdated Show resolved Hide resolved
test/async_cache_test.dart Outdated Show resolved Hide resolved
@MDSADABWASIM
Copy link

Any update on this @akmalviya03 @lrhn

Copy link
Member

@lrhn lrhn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM.
@natebosch WDYT?

@natebosch
Copy link
Member

@natebosch WDYT?

This one doesn't have the same issue with a Future field that loses it's expected association like #260

I don't think I have any concerns about landing this one.

They are interesting to consider together though - adding this capability might give stronger motivation for accepting #260

lib/src/async_cache.dart Show resolved Hide resolved
@akmalviya03
Copy link
Author

@natebosch @lrhn Any update on this ?

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.

4 participants