StorageWritePolicy
Index
Properties
Properties
requestQueue
Write mode for request queue additions. Note that this is a write policy for the queue, not the
queue instance itself (which is the top-level requestQueue crawler option).
writeThrough(default): requests are added immediately and are not rolled back with the transaction. This is safe (additions are deduplicated byuniqueKey, so a retry is idempotent) and keeps new requests visible to the crawler while the handler still runs.deferred: requests are only added when the transaction commits — strict all-or-nothing semantics, at the cost of the crawler not seeing them until the handler finishes.
Per-storage-type write policy of a StorageTransaction. Datasets and key-value stores are always
deferredand not configurable — deferring is the only safe mode for non-idempotent writes, and withDirectStorageAccess covers one-off immediate writes.