diff options
author | Googler <noreply@google.com> | 2017-02-14 17:57:07 +0000 |
---|---|---|
committer | Dmitry Lomov <dslomov@google.com> | 2017-02-15 10:03:02 +0000 |
commit | 226724a897fafad14988ce61ae97ef5cf86a03f3 (patch) | |
tree | 7ab596487319ecb46014523c597d4c3a6aff3391 /src/main/java/com/google/devtools/build/lib/actions/cache | |
parent | db5f2e413f8293b001a2de20e7c7d6d8b6970835 (diff) |
Adds --[no]use_action_cache startup option to disable the action cache.
Disabling the action cache is helpful in contexts where incremental builds are
not required, or where actions need to be repeatedly executed for debugging.
--
PiperOrigin-RevId: 147485055
MOS_MIGRATED_REVID=147485055
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/actions/cache')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/actions/cache/StubActionCache.java | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/actions/cache/StubActionCache.java b/src/main/java/com/google/devtools/build/lib/actions/cache/StubActionCache.java new file mode 100644 index 0000000000..9e1cdd3663 --- /dev/null +++ b/src/main/java/com/google/devtools/build/lib/actions/cache/StubActionCache.java @@ -0,0 +1,40 @@ +// Copyright 2017 The Bazel Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package com.google.devtools.build.lib.actions.cache; + +import java.io.PrintStream; + +/** An {@link ActionCache} which does not store entries. */ +public class StubActionCache implements ActionCache { + + @Override + public void put(String key, Entry entry) {} + + @Override + public Entry get(String key) { + return null; + } + + @Override + public void remove(String key) {} + + @Override + public long save() { + return 0; + } + + @Override + public void dump(PrintStream out) {} +} |