GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: preserve JSON cache metadata when writes fail by mehmetbahadirgungor · Pull Request #546 · Baseflow/flutter_cache_manager

Conversation

@mehmetbahadirgungor

@mehmetbahadirgungor mehmetbahadirgungor commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

✨ What kind of change does this PR introduce? (Bug fix, feature, docs update...)

Bug fix.

⤵️ What is the current behavior?

A failed JSON metadata write is reported but completes successfully. The repository can later persist the failed mutation, and a download replacement can delete the previous file even though its replacement metadata was not saved.

🆕 What is the new behavior (if this is a feature change)?

JSON mutations are serialized and committed to memory only after an atomic snapshot write succeeds. Failed JSON persistence operations now propagate errors instead of silently succeeding. This is an intentional failure-path behavior change; there are no public API or signature breaking changes. Failed writes leave the last committed metadata intact and do not prevent later operations. The proposed version remains 3.4.9, and maintainers may adjust it if necessary. Cache-hit timestamp updates use the current entry instead of rewriting a stale path. An existing file-deletion ordering issue remains: a failed metadata deletion after a file is removed leaves a stale record, and rollback means later writes can retain it. Replacement downloads now remove the old file only after the new file and its metadata have been saved.

💥 Does this PR introduce a breaking change?

No

🐛 Recommendations for testing

Flutter 3.47.4: formatting, analysis, and 147 tests passed. Web, Linux, and Android debug builds passed after the replacement-ordering change; verify iOS, macOS, and Windows in CI. Publish dry-run reports the existing ignored tracked-files warning.

📝 Links to relevant issues/docs

Related to the replacement persistence requirement for #508.

🤔 Checklist before submitting

  • All projects build
  • Follows style guide lines (code style guide)
  • Relevant documentation was updated
  • Rebased onto current main
  • Version bumped and dated CHANGELOG entry added

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
mehmetbahadirgungor added 2 commits November 3, 2026 12:23
@mehmetbahadirgungor
fix: make JSON cache metadata writes transactional
13184a9
@mehmetbahadirgungor
fix: retain cached file until replacement is persisted
6cf5063
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@mehmetbahadirgungor
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.