Skip to main content

syncache_workmanager 0.1.0 copy "syncache_workmanager: ^0.1.0" to clipboard
syncache_workmanager: ^0.1.0 copied to clipboard

Background flush for Syncache outbox mutations. Wires workmanager's periodic and one-off background tasks to the Syncache mutation outbox so offline writes sync even when the app process has been killed.

Changelog #

0.1.0 #

  • Initial release.
  • SyncacheBackgroundFlusher: flushes Syncache outbox mutations inside a workmanager background task — recovers pending records (recoverPendingMutations), sends them (processPendingMutations), and optionally sweeps expired entries (cleanup), within a wall-clock time budget suited to OS background-execution limits (≈30s on iOS, a few minutes on Android).
  • SyncacheBackgroundCacheRegistration: wires one typed cache into the flusher via injected callbacks (createCache, resolveRecord) so the background isolate rebuilds fresh caches over the app's durable store and outbox.
  • SyncacheFlushReport: per-task counts (recovered, remaining, swept), a budget-exhaustion flag, and duration.
  • runSyncacheTask + isSyncacheTask + the canonical syncacheFlushTaskName / syncacheCleanupTaskName constants for wiring a workmanager callbackDispatcher, with onReport / onError hooks for background logging.
  • registerSyncachePeriodicFlush / registerSyncacheOneOffFlush registration helpers defaulting to a network-connected constraint.
  • Unsent mutations always stay in the outbox: a background pass that runs out of time or network never loses work.
0
likes
110
points
17
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Background flush for Syncache outbox mutations. Wires workmanager's periodic and one-off background tasks to the Syncache mutation outbox so offline writes sync even when the app process has been killed.

Repository (GitHub)
View/report issues
Contributing

Topics

#cache #offline-first #background #workmanager

License

MIT (license)

Dependencies

flutter, syncache, workmanager

More

Packages that depend on syncache_workmanager