An interface to the different caches.
More...
#include <cache.hpp>
|
| bool | lookup_direct (const std::string &direct_hash, const std::map< std::string, expected_file_t > &expected_files, const bool allow_hard_links, const bool create_target_dirs, int &return_code) noexcept |
| | Perform a direct mode cache lookup. More...
|
| |
| void | add_direct (const std::string &direct_hash, const std::string &hash, const string_list_t &implicit_input_files) |
| | Add a new direct mode entry to the cache. More...
|
| |
| bool | lookup (const std::string &hash, const std::map< std::string, expected_file_t > &expected_files, const bool allow_hard_links, const bool create_target_dirs, int &return_code) noexcept |
| | Perform a cache lookup. More...
|
| |
| void | add (const std::string &hash, const cache_entry_t &entry, const std::map< std::string, expected_file_t > &expected_files, const bool allow_hard_links) |
| | Add a new entry to the cache(s). More...
|
| |
|
|
bool | lookup_in_local_cache (const std::string &hash, const std::map< std::string, expected_file_t > &expected_files, const bool allow_hard_links, const bool create_target_dirs, int &return_code) |
| |
|
bool | lookup_in_remote_cache (const std::string &hash, const std::map< std::string, expected_file_t > &expected_files, const bool allow_hard_links, const bool create_target_dirs, int &return_code) |
| |
An interface to the different caches.
◆ add()
| void bcache::cache_t::add |
( |
const std::string & |
hash, |
|
|
const cache_entry_t & |
entry, |
|
|
const std::map< std::string, expected_file_t > & |
expected_files, |
|
|
const bool |
allow_hard_links |
|
) |
| |
Add a new entry to the cache(s).
- Parameters
-
| hash | The hash of the cache entry. |
| entry | The cache entry description. |
| expected_files | Paths to the actual files in the local file system (map from file ID to an expected file descriptor). |
| allow_hard_links | True if we are allowed to use hard links. |
◆ add_direct()
| void bcache::cache_t::add_direct |
( |
const std::string & |
direct_hash, |
|
|
const std::string & |
hash, |
|
|
const string_list_t & |
implicit_input_files |
|
) |
| |
Add a new direct mode entry to the cache.
- Parameters
-
| direct_hash | The hash of the direct mode cache entry. |
| hash | The hash of the preprocessor mode cache entry. |
| implicit_input_files | A list of implicit input file paths. |
◆ lookup()
| bool bcache::cache_t::lookup |
( |
const std::string & |
hash, |
|
|
const std::map< std::string, expected_file_t > & |
expected_files, |
|
|
const bool |
allow_hard_links, |
|
|
const bool |
create_target_dirs, |
|
|
int & |
return_code |
|
) |
| |
|
noexcept |
Perform a cache lookup.
- Parameters
-
| hash | The hash of the cache entry. |
| expected_files | Paths to the actual files in the local file system (map from file ID to an expected file descriptor). |
| allow_hard_links | True if we are allowed to use hard links. |
| create_target_dirs | True if the target directory of the cached file must be created. |
| [out] | return_code | The return code of the program. |
- Returns
- true if we had a cache hit, otherwise false.
◆ lookup_direct()
| bool bcache::cache_t::lookup_direct |
( |
const std::string & |
direct_hash, |
|
|
const std::map< std::string, expected_file_t > & |
expected_files, |
|
|
const bool |
allow_hard_links, |
|
|
const bool |
create_target_dirs, |
|
|
int & |
return_code |
|
) |
| |
|
noexcept |
Perform a direct mode cache lookup.
- Parameters
-
| direct_hash | The hash of the direct mode cache entry. |
| expected_files | Paths to the actual files in the local file system (map from file ID to an expected file descriptor). |
| allow_hard_links | True if we are allowed to use hard links. |
| create_target_dirs | True if the target directory of the cached file must be created. |
| [out] | return_code | The return code of the program. |
- Returns
- true if we had a cache hit, otherwise false.
The documentation for this class was generated from the following files: