Re: [ServiceWorker] Cache transactions & fixing `addAll` (#823)

> Can we explain what happens with multiple overlapping addAlls & puts in a simpler way? What does gecko currently do?

What gecko does is very simple:

* Every put() writes the corresponding body to a disk temp file.  When the file is complete its committed into the backing sqlite database.  Any old, overwritten records are removed at this point.  Multiple overlapping put()s will result in the last put() winning.
* For addAll() we write the bodies for all responses to disk temp files.  When all of the temp files are complete its committed into the backing sqlite database.  Again, last to complete wins.
* Any match() calls between the start of a put() and the put() being committed do not take into account the new record.

---
Reply to this email directly or view it on GitHub:
https://github.com/slightlyoff/ServiceWorker/issues/823#issuecomment-174239967

Received on Sunday, 24 January 2016 01:11:19 UTC