Conversation
| The test for locking is failing |
Simplify and fix memory leak
| I dont' see why we need any locking here... I might need some help fixing the tests though |
977c314 to 2c1c839 Compare 530ec18 to df0d75b Compare | await readResponse(result) | ||
| | ||
| notEqual(store.createWriteStream(request, requestValue), undefined) | ||
| }) |
There was a problem hiding this comment.
Why this test was removed? Is this functionality not needed anymore?
There was a problem hiding this comment.
IMHO. We don't need locking. The behavior is removed.
b570a78 to 57e0416 Compare db4512e to 551e79d Compare f426a4c to 70308fc Compare | With how we have the cache store currently set up, locking is needed so we don't read from a response that's currently being written to For example if a request is made to some server, it's possible for another request to be made to the same resource before the first request finishes. If that happens currently (with locking), the cache store will see that the first request is still in flight since it's locked and return undefined. Without locking, the cache store will see that the first request has some cached details (from the Or in other words what could happen w/o locking,
Another smaller thing is that w/o locking we could end up w/ two write streams for the same resource. Currently, because we return Optionally, we could just not write the response into I think we should stick with the locking, however, either or works |
| I still think we should skip locking. Unless you have a strong opinion about it. |
Simplify and fix memory leak
This relates to...
Rationale
Changes
Features
Bug Fixes
Breaking Changes and Deprecations
Status