Skip to content

Commit

Permalink
Document local action cache
Browse files Browse the repository at this point in the history
  • Loading branch information
davido committed Mar 20, 2018
1 parent 791dbaa commit fffe15b
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions site/docs/remote-caching.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ make builds significantly faster.
* [Read only from the remote cache](#read-only-from-the-remote-cache)
* [Exclude specific targets from using the remote cache](#exclude-specific-targets-from-using-the-remote-cache)
* [Delete content from the remote cache](#delete-content-from-the-remote-cache)
* [Local action cache](#local-action-cache)
* [Known Issues](#known-issues)
* [External Links](#external-links)
* [Bazel remote execution (in development)](#bazel-remote-execution-in-development)
Expand Down Expand Up @@ -306,6 +307,31 @@ You may want to delete content from the cache to:
* Create a clean cache after a cache was poisoned
* Reduce the amount of storage used by deleting old outputs

## Local action cache

Bazel supports directory based action cache. It may be very useful, when
working on multiple branches or multiple workspaces of the same project.
It's also supported to provide user specific directory cache location, so
that the local cache activation can be configured in project wide
configuration file and committed into project repository. To activate the
local action cache, add this line to your `tools/bazel.rc` file:

```
build --local_disk_cache=~/.gerrit/bazel-cache/cas
```

To have cache hits across different workspaces, additional option should be
used to prevent Bazel to forward `PATH`, `LD_LIBRARY_PATH`, and `TMPDIR` env
variables to all actions:

```
build --experimental_strict_action_env
```

This option should be activated per default, by providing some sane cache
location, like `~/.bazel/cas` or similar, but currently, one feature is
still missing to allow to specify an upper bound on the cache directory.

## Known issues

**Input file modification during a Build**
Expand Down

0 comments on commit fffe15b

Please sign in to comment.