Review feedback.

Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
This commit is contained in:
Eric Peterson
2021-07-24 17:45:48 +02:00
committed by Eric Peterson
parent 1bada775a9
commit 693db1da54
3 changed files with 24 additions and 27 deletions
+1 -1
View File
@@ -112,7 +112,7 @@ export const createCacheMiddleware = ({
};
// When a socket is closed, if there were no errors and the data written
// over the socket should be cached, cache it as a base64-encoded string!
// over the socket should be cached, cache it!
socket.on('close', hadError => {
if (writeToCache && !hadError) {
cache.set(reqPath, Buffer.concat(chunks));