LLVM  6.0.0svn
llvm::CachePruningPolicy Struct Reference

Policy for the pruneCache() function. More...

#include "llvm/Support/CachePruning.h"

Collaboration diagram for llvm::CachePruningPolicy:
[legend]

## Public Attributes

std::chrono::seconds Interval = std::chrono::seconds(1200)
The pruning interval. More...

std::chrono::seconds Expiration = std::chrono::hours(7 * 24)
The expiration for a file. More...

unsigned MaxSizePercentageOfAvailableSpace = 75
The maximum size for the cache directory, in terms of percentage of the available space on the the disk. More...

uint64_t MaxSizeBytes = 0
The maximum size for the cache directory in bytes. More...

## Detailed Description

Policy for the pruneCache() function.

A default constructed CachePruningPolicy provides a reasonable default policy.

Definition at line 27 of file CachePruning.h.

## ◆ Expiration

 std::chrono::seconds llvm::CachePruningPolicy::Expiration = std::chrono::hours(7 * 24)

The expiration for a file.

When a file hasn't been accessed for Expiration seconds, it is removed from the cache. A value of 0 disables the expiration-based pruning.

Definition at line 36 of file CachePruning.h.

Referenced by llvm::parseCachePruningPolicy(), and llvm::pruneCache().

## ◆ Interval

 std::chrono::seconds llvm::CachePruningPolicy::Interval = std::chrono::seconds(1200)

The pruning interval.

This is intended to be used to avoid scanning the directory too often. It does not impact the decision of which file to prune. A value of 0 forces the scan to occur.

Definition at line 31 of file CachePruning.h.

Referenced by llvm::parseCachePruningPolicy(), and llvm::pruneCache().

## ◆ MaxSizeBytes

 uint64_t llvm::CachePruningPolicy::MaxSizeBytes = 0

The maximum size for the cache directory in bytes.

A value over the amount 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.

Definition at line 48 of file CachePruning.h.

Referenced by llvm::parseCachePruningPolicy(), and llvm::pruneCache().

## ◆ MaxSizePercentageOfAvailableSpace

 unsigned llvm::CachePruningPolicy::MaxSizePercentageOfAvailableSpace = 75

The maximum size for the cache directory, in terms of percentage of the available space on the the disk.

Set to 100 to indicate no limit, 50 to indicate that the cache size will not be left over half the available disk space. A value over 100 will be reduced to 100. A value of 0 disables the percentage size-based pruning.

Definition at line 43 of file CachePruning.h.

Referenced by llvm::parseCachePruningPolicy(), and llvm::pruneCache().

The documentation for this struct was generated from the following file: