Review Robots' caching logic, fixes #713 #717
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
/robots.txt
)First check the example from #573 where a redirected robots.txt must not be cached for the target host:
The URL
http://wyomingtheband.com/
redirects tohttps://www.facebook.com/wyomingtheband/
: the redirect is followed but the target is forbidden byhttps://www.facebook.com/robots.txt
:And one example where the redirected robots.txt is cached also for the target because it is at root (
https://pfau-schinken.de/robots.txt
redirects tohttps://www.pfau-schinken.de/robots.txt
) - no cache miss for the second fetch:Note that there is no caching if two robots.txt redirect to the same target not at root level. We would need a cache by URL to achieve this.