< all work · 03 / 05

Cached Network Image CE

The maintained fork of Flutter’s most popular image-caching package, rebuilt on a caching engine that doesn’t block the UI thread.

Role
Maintainer, Development, Open Source
Status
Maintained, on pub.dev (MIT)
Stack
Dart · Flutter · hive_ce · IndexedDB
Links
pub.dev ↗ · GitHub ↗
Cached Network Image CE cover
  • 8×faster cache reads (16 → 2 ms)
  • 4×faster writes (116 → 29 ms)
  • 2.9×faster cleanup (55 → 19 ms)

Cache metadata operations, 10 KB payload, iPhone Simulator.

01 The problem

cached_network_image is one of the most used packages in the Flutter ecosystem, and it has been effectively unmaintained since August 2024, with 300+ open issues including memory leaks and scroll jank.

Under the hood it routes every “have I downloaded this already?” check through a platform channel into SQLite. On image-heavy lists you can feel it.

02 What I built

Replaced sqflite with hive_ce, a pure-Dart, non-blocking store, for cache metadata. Image bytes stay on the native filesystem; no platform channel or SQL parser in the hot path.

Real web support with a persistent IndexedDB cache, HTTP and cache interceptors, pluggable TTL or LRU eviction, a pre-caching API, and a hook for formats Flutter can’t decode.

Kept the widget and provider API, so migrating is a dependency swap.

03 Worth knowing

  • Listed on Flutter Gems.
  • Used by open-source apps such as Kazumi, PiliPlus, MusicPod and plezy.
  • Honest trade-off documented up front: switching engines means users re-download images once.