LLVM: llvm::cas::ActionCache Class Reference (original) (raw)
A cache from a key (that describes an action) to the result of performing that action. More...
#include "[llvm/CAS/ActionCache.h](ActionCache%5F8h%5Fsource.html)"
| Public Member Functions | |
|---|---|
| Expected< std::optional< CASID > > | get (const CacheKey &ActionKey, bool CanBeDistributed=false) const |
| Get a previously computed result for ActionKey. | |
| Error | put (const CacheKey &ActionKey, const CASID &Result, bool CanBeDistributed=false) |
| Cache Result for the ActionKey computation. | |
| virtual Error | validate () const =0 |
| Validate the ActionCache contents. | |
| virtual | ~ActionCache ()=default |
A cache from a key (that describes an action) to the result of performing that action.
Actions are expected to be pure. Storing mappings from one action to multiple results will result in error (cache poisoning).
Definition at line 49 of file ActionCache.h.
| virtual llvm::cas::ActionCache::~ActionCache ( ) | virtualdefault |
|---|
◆ ActionCache()
| llvm::cas::ActionCache::ActionCache ( const CASContext & Context) | inlineprotected |
|---|
◆ get()
Get a previously computed result for ActionKey.
Parameters
| CanBeDistributed | is a hint to the underlying implementation that if it is true, the lookup is profitable to be done on a distributed caching level, not just locally. The implementation is free to ignore this flag. |
|---|
Definition at line 58 of file ActionCache.h.
References llvm::arrayRefFromStringRef(), getImpl(), and llvm::cas::CacheKey::getKey().
◆ getContext()
| const CASContext & llvm::cas::ActionCache::getContext ( ) const | inlineprotected |
|---|
◆ getImpl()
◆ put()
◆ putImpl()
◆ validate()
| virtual Error llvm::cas::ActionCache::validate ( ) const | pure virtual |
|---|
The documentation for this class was generated from the following files:
- include/llvm/CAS/ActionCache.h
- lib/CAS/ActionCache.cpp