@@ -917,121 +917,83 @@ Direct
917917&scons;
918918to maintain a derived-file cache in
919919<parameter >cache_dir</parameter >.
920- The derived files in the cache will be shared
921- among all the builds specifying the same
920+ Cached files are shared across builds that specify the same
922921<parameter >cache_dir</parameter >.
923- Specifying a
924- <parameter >cache_dir</parameter >
925- of
926- <constant >None</constant >
927- disables derived file caching.
922+ Setting <parameter >cache_dir</parameter >
923+ to <constant >None</constant > disables caching.
928924</para >
929925
930926<para >
931- Calling the environment method
927+ The environment method
932928&f-link-env-CacheDir;
933- limits the effect to targets built
934- through the specified &consenv; .
935- Calling the global function
936- &f-link-CacheDir;
937- sets a global default
938- that will be used by all targets built
939- through &consenvs;
940- that do not set up environment-specific
941- caching by calling &f-env-CacheDir; .
929+ applies caching only to targets built
930+ through that specific &consenv; .
931+ The global function &f-link-CacheDir;
932+ sets a default that applies
933+ to all targets unless overridden by an
934+ environment-specific call.
942935</para >
943936
944937<para >
945- Caching behavior can be configured by passing a specialized cache
946- class as the optional <parameter >custom_class</parameter > parameter.
947- This class must be a subclass of
948- <classname >SCons.CacheDir.CacheDir</classname >.
949- &SCons; will internally invoke the custom class for performing
950- caching operations.
951- If the parameter is omitted or set to
952- <constant >None</constant >, &SCons; will use the default
953- <classname >SCons.CacheDir.CacheDir</classname > class.
938+ Caching behavior can be customized by passing a subclass of
939+ <classname >SCons.CacheDir.CacheDir</classname >
940+ as the optional <parameter >custom_class</parameter > parameter.
941+ If omitted or set to <constant >None</constant >,
942+ &SCons; uses the default class.
954943</para >
955944
956945<para >
957- When derived-file caching
958- is being used and
959- &scons;
960- finds a derived file that needs to be rebuilt,
961- it will first look in the cache to see if a
962- file with matching &buildsig; exists
963- (indicating the input file(s) and build action(s)
964- were identical to those for the current target),
965- and if so, will retrieve the file from the cache.
966- &scons;
967- will report
968- <computeroutput >Retrieved `file' from cache</computeroutput >
969- instead of the normal build message.
970- If the derived file is not present in the cache,
971- &scons;
972- will build it and
973- then place a copy of the built file in the cache,
974- identified by its &buildsig; , for future use.
946+ When caching is enabled and &scons;
947+ needs to rebuild a derived file,
948+ it first checks the cache for a matching &buildsig;
949+ (indicating identical inputs and build actions).
950+ If found, the file is retrieved from the cache.
951+ Otherwise, &scons; builds the file and
952+ stores a copy the cache under its &buildsig; .
975953</para >
976954
977955<para >
978- The
956+ By default, &scons; reports
979957<computeroutput >Retrieved `file' from cache</computeroutput >
980- messages are useful for human consumption,
981- but less useful when comparing log files between
982- &scons; runs which will show differences that are
983- noisy and not actually significant.
984- To disable,
985- use the <option >--cache-show</option > option.
986- With this option, &scons; changes printing
987- to always show the action that would
988- have been used to build the file without caching.
958+ on cache hits.
959+ Use the
960+ <link linkend =" opt-cache-show" ><option >--cache-show</option ></link >
961+ option to hide that the cache was involved
962+ and display the normal build string instead,
963+ for consistent log output.
989964</para >
990965
991966<para >
992- Derived-file caching
993- may be disabled for any invocation
994- of &scons; by giving the
995- <option >--cache-disable</option >
996- command line option;
997- cache updating may be disabled, leaving cache
998- fetching enabled, by giving the
999- <option >--cache-readonly</option > option.
967+ Disable caching for a specific invocation with the
968+ <link linkend =" opt-cache-disable" ><option >--cache-disable</option ></link >
969+ option.
970+ To allow retreival but prevent updates, use
971+ <link linkend =" opt-cache-readonly" ><option >--cache-readonly</option ></link >.
1000972</para >
1001973
1002974<para >
1003- If the
1004- <option >--cache-force</option >
1005- option is used,
1006- &scons;
1007- will place a copy of
1008- <emphasis >all</emphasis >
1009- derived files into the cache,
1010- even if they already existed
1011- and were not built by this invocation.
1012- This is useful to populate a cache
1013- the first time a
1014- <parameter >cache_dir</parameter >
1015- is used for a build,
1016- or to bring a cache up to date after
1017- a build with cache updating disabled
1018- (<option >--cache-disable</option >
1019- or <option >--cache-readonly</option >)
1020- has been done.
975+ The
976+ <link linkend =" opt-cache-force" ><option >--cache-force</option ></link >
977+ option copies <emphasis >all</emphasis > derived files into the cache,
978+ even pre-existing ones.
979+ This helps populate a new cache or update it
980+ after building with cache updating disabled
981+ (<link linkend =" opt-cache-disable" ><option >--cache-disable</option ></link >
982+ or <link linkend =" opt-cache-readonly" ><option >--cache-readonly</option ></link >).
1021983</para >
1022984
1023985<para >
1024- The
986+ Use
1025987&f-link-NoCache;
1026- method can be used to disable caching of specific files. This can be
1027- useful if inputs and/or outputs of some tool are impossible to
1028- predict or prohibitively large.
988+ to exclude specific files from caching,
989+ such as those with unpredictable inputs or outputs,
990+ or excessively large output files .
1029991</para >
1030992
1031993<para >
1032- Note that (at this time) &SCons; provides no facilities
1033- for managing the derived-file cache. It is up to the developer
1034- to arrange for cache pruning, expiry, access control, etc. if needed .
994+ &SCons; does not provide built-in tools for cache management.
995+ You will need to handle pruning, expiration,
996+ access control, and other maintenance tasks manually .
1035997</para >
1036998
1037999</summary >
0 commit comments