Hacker News new | ask | show | jobs
by streptomycin 4230 days ago
https://github.com/google/lovefield/blob/master/docs/dd/04_c...

Lovefield has an in-memory row cache, which is conceptually a big map of row ids to rows (and that is why Lovefield has unique row ids across the board). Currently the cache is a "dumb" cache: it contains exact duplica of what are persisted in the IndexedDB. The reason for doing that is to workaround IndexedDB inefficiency of handing bulk I/O, as described in backstore section. By caching all rows in memory, Lovefield avoids any additional round-trip required to load data from IndexedDB, with the price of memory usage.

How does that handle the case where the user has the app open in two tabs? Is there any synchronization?