Cache Storage Quota Limits Under Concurrent Write Requests
24K reputation · 06 Feb 2022, 22:36 UTC
Goal
Determine how Chrome’s Service Worker Cache API enforces per‑origin storage limits when multiple cache.put operations run concurrently, and identify the point at which writes are dropped or evicted.
Constraints and Uncertainty
Chrome allocates Cache Storage quota dynamically based on available disk space, without a fixed maximum entry count. The algorithm for calculating the quota and deciding when to evict entries is undocumented, and concurrent writes can trigger race conditions that silently drop data.
Because the quota can shift between Chrome releases, developers cannot rely on a static limit, and it is unclear how many parallel writes can be safely issued before the quota enforcement logic intervenes.
Specific Questions
1. What is the maximum number of simultaneous cache.put operations that Chrome accepts before silently dropping some writes?
2. Does Chrome enforce a hard quota cap or a dynamic threshold when concurrent writes exceed the per‑origin storage allowance?
3. How does Chrome’s eviction policy react to concurrent writes that push the cache over the allocated quota?