CppCommon  1.0.4.1
C++ Common Library
filecache.inl
Go to the documentation of this file.
1 
9 namespace CppCommon {
10 
11 inline bool FileCache::empty() const
12 {
13  std::shared_lock<std::shared_mutex> locker(_lock);
14  return _entries_by_key.empty();
15 }
16 
17 inline size_t FileCache::size() const
18 {
19  std::shared_lock<std::shared_mutex> locker(_lock);
20  return _entries_by_key.size();
21 }
22 
23 inline void swap(FileCache& cache1, FileCache& cache2) noexcept
24 {
25  cache1.swap(cache2);
26 }
27 
28 } // namespace CppCommon
File cache.
Definition: filecache.h:36
size_t size() const
Get the file cache size.
Definition: filecache.inl:17
bool empty() const
Is the file cache empty?
Definition: filecache.inl:11
C++ Common project definitions.
Definition: token_bucket.h:15
void swap(FileCache &cache1, FileCache &cache2) noexcept
Definition: filecache.inl:23