22.4. Disabling the Derived-File Cache
Prev | Chapter 22. Caching Built Files | Next

## 22.4. Disabling the Derived-File Cache

Retrieving an already-built file from the derived-file cache is usually a significant time-savings over rebuilding the file, but how much of a savings (or even whether it saves time at all) can depend a great deal on your system or network configuration. For example, retrieving cached files from a busy server over a busy network might end up being slower than rebuilding the files locally.

In these cases, you can specify the `--cache-disable` command-line option to tell SCons to not retrieve already-built files from the derived-file cache directory:

    % scons -Q
    cc -o hello.o -c hello.c
    cc -o hello hello.o
    % scons -Q -c
    Removed hello.o
    Removed hello
    % scons -Q
    Retrieved `hello.o' from cache
    Retrieved `hello' from cache
    % scons -Q -c
    Removed hello.o
    Removed hello
    % scons -Q --cache-disable
    cc -o hello.o -c hello.c
    cc -o hello hello.o

Prev | Up | Next
22.3. Not Using the Derived-File Cache for Specific Files | Home | 22.5. Populating a Derived-File Cache With Already-Built Files