From 44f876ceb8fb1cfc570d14abbda5c084c4756ef6 Mon Sep 17 00:00:00 2001 From: jjrv Date: Mon, 7 Aug 2017 22:44:59 +0300 Subject: [PATCH] Avoid storing redirect info when a cache key is specified. --- src/strategy/RemoteTransfer.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/strategy/RemoteTransfer.ts b/src/strategy/RemoteTransfer.ts index 387e35b..304c083 100644 --- a/src/strategy/RemoteTransfer.ts +++ b/src/strategy/RemoteTransfer.ts @@ -147,8 +147,7 @@ export class RemoteTransfer { this.streamStore = new stream.PassThrough(); this.strategy.cache.store(this.state.address, this.streamStore, headers).catch(() => {}); - // TODO: Only call this is cacheKey is not set! - this.strategy.addLinks(this.state.address); + if(!this.state.address.cacheKey) this.strategy.addLinks(this.state.address); } if(!state.buffer) state.buffer = new BufferStream();