parse_offline_extension 1.1.0 copy "parse_offline_extension: ^1.1.0" to clipboard
parse_offline_extension: ^1.1.0 copied to clipboard

Offline caching extension for Parse Server SDK Flutter. Adds O(1) local storage, batch saves, auto-migration, and connectivity-aware live lists to any ParseObject subclass.

1.1.0 #

  • Map-based storage (offline_cache_<ClassName>_v2): objects are stored as Map<objectId, jsonString> instead of List<String>, making every single-object read, write, existence check, and removal an O(1) hash operation instead of an O(n) linear scan.
  • Auto-migration: the old List<String> format is automatically upgraded on first access; existing cached data is preserved.
  • updateInLocalCache now returns Future<bool> indicating whether the object was found (previously Future<void>).
  • syncLocalCacheWithServer accepts an optional shouldSync predicate to skip objects that should not overwrite server state.
  • All json.decode calls are wrapped in try-catch; corrupt entries are skipped rather than crashing the operation.
  • clearLocalCacheForClass uses store.remove() (single key) instead of store.setStringList([]) (leaves empty list entry).
  • Replaced all print() calls with debugPrint().

1.0.0 #

  • Initial public release.
  • saveToLocalCache() — persist a ParseObject to CoreStore.
  • removeFromLocalCache() — remove a single object by objectId.
  • updateInLocalCache(Map updates) — partial update; returns bool indicating whether the object was found.
  • loadFromLocalCache(className, objectId) — O(1) lookup by objectId.
  • loadAllFromLocalCache(className) — load all cached objects for a class.
  • saveAllToLocalCache(className, objects) — efficient batch save in one write.
  • existsInLocalCache(className, objectId) — O(1) existence check.
  • getAllObjectIdsInLocalCache(className) — returns all cached ids (no JSON decoding required).
  • clearLocalCacheForClass(className) — wipe entire class cache.
  • syncLocalCacheWithServer(className, {shouldSync}) — push cached objects to the server with an optional filter predicate.
  • Map-based storage (offline_cache_<ClassName>_v2) for O(1) per-object operations; auto-migrates the legacy list format on first read.
  • All json.decode calls are guarded — corrupt entries are skipped, not thrown.
0
likes
150
points
91
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Offline caching extension for Parse Server SDK Flutter. Adds O(1) local storage, batch saves, auto-migration, and connectivity-aware live lists to any ParseObject subclass.

Repository (GitHub)
View/report issues

Topics

#parse #parse-server #offline #cache #local-storage

License

MIT (license)

Dependencies

flutter, parse_server_sdk_flutter

More

Packages that depend on parse_offline_extension