summaryrefslogtreecommitdiff
path: root/include/llvm/Support/CachePruning.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Support/CachePruning.h')
-rw-r--r--include/llvm/Support/CachePruning.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/llvm/Support/CachePruning.h b/include/llvm/Support/CachePruning.h
index 46e34358573b..c577e9b8b631 100644
--- a/include/llvm/Support/CachePruning.h
+++ b/include/llvm/Support/CachePruning.h
@@ -46,6 +46,15 @@ struct CachePruningPolicy {
/// of available space on the disk will be reduced to the amount of available
/// space. A value of 0 disables the absolute size-based pruning.
uint64_t MaxSizeBytes = 0;
+
+ /// The maximum number of files in the cache directory. A value of 0 disables
+ /// the number of files based pruning.
+ ///
+ /// This defaults to 1000000 because with that many files there are
+ /// diminishing returns on the effectiveness of the cache, and some file
+ /// systems have a limit on how many files can be contained in a directory
+ /// (notably ext4, which is limited to around 6000000 files).
+ uint64_t MaxSizeFiles = 1000000;
};
/// Parse the given string as a cache pruning policy. Defaults are taken from a