Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

update FAQ CI usage section for caching caveats #1359

Merged
merged 1 commit into from
Nov 12, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions docs/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -467,3 +467,26 @@ before_install:
install:
- dep ensure
```

Caching can also be enabled but there are a couple of caveats you should be aware of:

> Until recently, we have had intermittent cache corruption that would have been super annoying if it was breaking Travis build too.
>
> Also according to https://docs.travis-ci.com/user/caching/#Things-not-to-cache, they don't recommend it for larger caches.
>
> https://docs.travis-ci.com/user/caching/#How-does-the-caching-work%3F
>
> > Note that this makes our cache not network-local, it's still bound to network bandwidth and DNS resolutions for S3.
> > That impacts what you can and should store in the cache. If you store archives larger than a few hundred megabytes in the cache, it's unlikely that you'll see a big speed improvement.
>
> [@carolynvs in #1293](https://github.com/golang/dep/pull/1293#issuecomment-342969292)

If you are sure you want to enable caching on travis, it can be done by adding `$GOPATH/pkg/dep`, the default location for `dep` cache, to the cached directories:

```yml
# ...

cache:
directories:
- $GOPATH/pkg/dep
```