Eduardo Bouças @eduardoboucas.com · Jun 12

Support for conditional writes has landed in Netlify Blobs. The `set` and `setJSON` now let you perform create-only and update-only atomic operations. For example, here's how you can use the `onlyIfNew` option to write an entry only if the key is new. 🧵

4 likes 1 replies

?

Replies

Eduardo Bouças · Jun 12

With `onlyIfMatch`, you can update an entry only if it exists and its content matches a given ETag. When performing multiple updates to an entry, this gives you a safeguard against data inconsistencies resulting from multiple sources mutating the entry.