Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Async cache won't store exceptions #258

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 dart-lang/core#366 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
@akmalviya03 akmalviya03 requested a review from lrhn December 26, 2023 16:33
@MDSADABWASIM
Copy link

Any update on this @akmalviya03 @lrhn

Copy link
Contributor

@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
Contributor

@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 ?

@mosuem
Copy link
Contributor

mosuem commented Oct 16, 2024

Closing as the dart-lang/async repository is merged into the dart-lang/core monorepo. Please re-open this PR there!

@mosuem mosuem closed this Oct 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants