Class client for storing files in memory Usually retrieved from components::FsCache
More...
#include <userver/fs/fs_cache_client.hpp>
Public Member Functions | |
| FsCacheClient (std::string_view dir, std::chrono::milliseconds update_period, engine::TaskProcessor &tp) | |
| Fills the cache and starts periodic update. | |
| FileInfoWithDataConstPtr | TryGetFile (std::string_view path) const |
| get file from memory | |
| void | UpdateCache () |
| Concurrency-safe cache update. | |
Class client for storing files in memory Usually retrieved from components::FsCache
Definition at line 19 of file fs_cache_client.hpp.
| fs::FsCacheClient::FsCacheClient | ( | std::string_view | dir, |
| std::chrono::milliseconds | update_period, | ||
| engine::TaskProcessor & | tp | ||
| ) |
Fills the cache and starts periodic update.
| dir | directory to cache files from |
| update_period | time (0 - fill the cache only at startup), not used in Linux |
| tp | task processor to do filesystem operations |
| FileInfoWithDataConstPtr fs::FsCacheClient::TryGetFile | ( | std::string_view | path | ) | const |
get file from memory
| path | to file |
nullptr if no file with specified name on FS