diff --git a/cmd/drone-build/run.go b/cmd/drone-build/run.go index 6c943040c..6c8b1d70e 100644 --- a/cmd/drone-build/run.go +++ b/cmd/drone-build/run.go @@ -44,12 +44,9 @@ func setup(c *Context) error { opts.Volumes = true opts.Caching = true } - // if repository is public, and a pull request, disable - // the cache. - if c.Repo.Private == false && - c.Build.PullRequest != nil && - c.Build.PullRequest.Number != 0 { - opts.Caching = false + // if repository is private enable caching + if c.Repo.Private { + opts.Caching = true } // inject the matrix parameters into the yaml