~/talk

Smarter Application Caching with Kotlin Flow

Talkat droidcon Berlin 2022 · 2022-07-06..07-08· [android, databases]
links:none on file
slides:none on file

Shows a concrete caching layer built with Kotlin Flow that emits cached data immediately and network data when it arrives, using a createCachedCacheFlow pattern backed by a Firestore GET as the source and Compose + ViewModel for state. Demo uses a Firestore backend with a simulated 7s network delay and a max data age 3s policy, demonstrating layered caches, OkHttp/cache-control tradeoffs, an error-filter policy that surfaces real errors (e.g. user not found), and a working offline UX with stale-data banners.

AI-written summary · about

  1. 0:00Introduction and setup
  2. 1:52Why native apps over web
  3. 6:10Cache control headers explained
  4. 11:25Application layer caching
  5. 17:21Nick's caching layer concept
  6. 18:46Live demo of caching layer
  7. 23:00Handling errors and stale data
  8. 27:13Code walkthrough of caching layer
  9. 35:33Stale data indicator implementation
  10. 38:20Summary and call to action
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.