Skip to content
Snippets Groups Projects
Commit bf61dda5 authored by Peter Collingbourne's avatar Peter Collingbourne
Browse files

CachePruning: Allow limiting the number of files in the cache directory.

The default limit is 1000000 but it can be configured with a cache
policy. The motivation is that some filesystems (notably ext4) have
a limit on the number of files that can be contained in a directory
(separate from the inode limit).

Differential Revision: https://reviews.llvm.org/D40327

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@318857 91177308-0d34-0410-b5e6-96231b3b80d8
parent e678b6c3
No related branches found
No related tags found
No related merge requests found
...@@ -173,6 +173,10 @@ Possible key-value pairs are: ...@@ -173,6 +173,10 @@ Possible key-value pairs are:
``cache_size_bytes=1g`` on its own will cause both the 1GB and default 75% ``cache_size_bytes=1g`` on its own will cause both the 1GB and default 75%
policies to be applied unless the default ``cache_size`` is overridden. policies to be applied unless the default ``cache_size`` is overridden.
- ``cache_size_files=X``:
Set the maximum number of files in the cache directory. Set to 0 to indicate
no limit. The default is 1000000 files.
- ``prune_after=Xs``, ``prune_after=Xm``, ``prune_after=Xh``: Sets the - ``prune_after=Xs``, ``prune_after=Xm``, ``prune_after=Xh``: Sets the
expiration time for cache files to ``X`` seconds (or minutes, hours expiration time for cache files to ``X`` seconds (or minutes, hours
respectively). When a file hasn't been accessed for ``prune_after`` seconds, respectively). When a file hasn't been accessed for ``prune_after`` seconds,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment