2022-03-21 13:56:38 +00:00
|
|
|
#pragma once
|
|
|
|
|
2022-03-14 19:15:07 +00:00
|
|
|
#include <Common/FileCache_fwd.h>
|
|
|
|
|
2022-06-28 11:29:07 +00:00
|
|
|
namespace Poco { namespace Util { class AbstractConfiguration; } } // NOLINT(cppcoreguidelines-virtual-class-destructor)
|
2022-03-14 19:15:07 +00:00
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
struct FileCacheSettings
|
|
|
|
{
|
2022-03-21 11:30:25 +00:00
|
|
|
size_t max_size = 0;
|
|
|
|
size_t max_elements = REMOTE_FS_OBJECTS_CACHE_DEFAULT_MAX_ELEMENTS;
|
2022-03-14 19:15:07 +00:00
|
|
|
size_t max_file_segment_size = REMOTE_FS_OBJECTS_CACHE_DEFAULT_MAX_FILE_SEGMENT_SIZE;
|
2022-06-15 11:39:00 +00:00
|
|
|
|
2022-03-23 18:00:42 +00:00
|
|
|
bool cache_on_write_operations = false;
|
2022-03-14 19:15:07 +00:00
|
|
|
|
2022-05-25 08:54:28 +00:00
|
|
|
size_t enable_cache_hits_threshold = REMOTE_FS_OBJECTS_CACHE_ENABLE_HITS_THRESHOLD;
|
2022-06-15 11:39:00 +00:00
|
|
|
bool enable_filesystem_query_cache_limit = false;
|
|
|
|
|
|
|
|
bool do_not_evict_index_and_mark_files = true;
|
2022-05-25 08:54:28 +00:00
|
|
|
|
2022-03-14 19:15:07 +00:00
|
|
|
void loadFromConfig(const Poco::Util::AbstractConfiguration & config, const std::string & config_prefix);
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|