Skip to content
This repository has been archived by the owner on Jan 5, 2019. It is now read-only.

Add support for x-taskcluster-skip-cache header #129

Merged
merged 2 commits into from Nov 11, 2016
Merged

Conversation

jonasfj
Copy link
Contributor

@jonasfj jonasfj commented Oct 31, 2016

No description provided.

'',
'**Caching**, artifacts may be cached in data centers closer to the',
'workers in-order to reduce bandwidth costs. This can lead to response',
'times at upwards 30 seconds. Caching can be skipped by setting the header',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should be putting a specific time in this comment. Let's leave it as "This can lead to longer response times when there are problems with resource caching".

@@ -356,6 +356,9 @@ var replyWithArtifact = async function(taskId, runId, name, req, res) {
if (!region) {
debug('artifact from CDN for ip: %s', req.headers['x-forwarded-for']);
url = this.publicBucket.createGetUrl(prefix);
} else if (req.headers['x-taskcluster-skip-cache'] === 'true') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we .toLowerCase() the header value before comparison? Maybe we should also support 1|0?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should... good catch..

@gregarndt
Copy link
Collaborator

I'm +1 for this. In the case of resources in AWS where this would be used (mainly Treeherder), it's either we incur a transfer by cloud-mirror and then serve from that bucket, or we direct Treeherder to the original bucket still incurring the transfer. That seems acceptable in this case.

@jonasfj jonasfj merged commit d813ef2 into master Nov 11, 2016
@jonasfj jonasfj deleted the skip-cache-header branch November 11, 2016 21:30
imbstack pushed a commit that referenced this pull request Dec 14, 2018
Add support for x-taskcluster-skip-cache header
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants