mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-29 11:02:08 +00:00
Make the naming a little less confusing
This commit is contained in:
parent
5d9687f5d9
commit
b1889b0284
@ -1518,8 +1518,7 @@ try
|
|||||||
global_context->setMMappedFileCache(mmap_cache_size);
|
global_context->setMMappedFileCache(mmap_cache_size);
|
||||||
|
|
||||||
/// A cache for query results.
|
/// A cache for query results.
|
||||||
global_context->setQueryCache();
|
global_context->setQueryCache(config());
|
||||||
global_context->updateQueryCacheConfiguration(config());
|
|
||||||
|
|
||||||
#if USE_EMBEDDED_COMPILER
|
#if USE_EMBEDDED_COMPILER
|
||||||
/// 128 MB
|
/// 128 MB
|
||||||
|
@ -2041,7 +2041,7 @@ void Context::dropIndexMarkCache() const
|
|||||||
shared->index_mark_cache->reset();
|
shared->index_mark_cache->reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Context::setQueryCache()
|
void Context::setQueryCache(const Poco::Util::AbstractConfiguration & config)
|
||||||
{
|
{
|
||||||
auto lock = getLock();
|
auto lock = getLock();
|
||||||
|
|
||||||
@ -2049,6 +2049,14 @@ void Context::setQueryCache()
|
|||||||
throw Exception(ErrorCodes::LOGICAL_ERROR, "Query cache has been already created.");
|
throw Exception(ErrorCodes::LOGICAL_ERROR, "Query cache has been already created.");
|
||||||
|
|
||||||
shared->query_cache = std::make_shared<QueryCache>();
|
shared->query_cache = std::make_shared<QueryCache>();
|
||||||
|
shared->query_cache->updateConfiguration(config);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Context::updateQueryCacheConfiguration(const Poco::Util::AbstractConfiguration & config)
|
||||||
|
{
|
||||||
|
auto lock = getLock();
|
||||||
|
if (shared->query_cache)
|
||||||
|
shared->query_cache->updateConfiguration(config);
|
||||||
}
|
}
|
||||||
|
|
||||||
QueryCachePtr Context::getQueryCache() const
|
QueryCachePtr Context::getQueryCache() const
|
||||||
@ -2064,13 +2072,6 @@ void Context::dropQueryCache() const
|
|||||||
shared->query_cache->reset();
|
shared->query_cache->reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Context::updateQueryCacheConfiguration(const Poco::Util::AbstractConfiguration & config)
|
|
||||||
{
|
|
||||||
auto lock = getLock();
|
|
||||||
if (shared->query_cache)
|
|
||||||
shared->query_cache->updateConfiguration(config);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Context::setMMappedFileCache(size_t cache_size_in_num_entries)
|
void Context::setMMappedFileCache(size_t cache_size_in_num_entries)
|
||||||
{
|
{
|
||||||
auto lock = getLock();
|
auto lock = getLock();
|
||||||
|
@ -861,7 +861,7 @@ public:
|
|||||||
void dropMMappedFileCache() const;
|
void dropMMappedFileCache() const;
|
||||||
|
|
||||||
/// Create a cache of query results for statements which run repeatedly.
|
/// Create a cache of query results for statements which run repeatedly.
|
||||||
void setQueryCache();
|
void setQueryCache(const Poco::Util::AbstractConfiguration & config);
|
||||||
void updateQueryCacheConfiguration(const Poco::Util::AbstractConfiguration & config);
|
void updateQueryCacheConfiguration(const Poco::Util::AbstractConfiguration & config);
|
||||||
std::shared_ptr<QueryCache> getQueryCache() const;
|
std::shared_ptr<QueryCache> getQueryCache() const;
|
||||||
void dropQueryCache() const;
|
void dropQueryCache() const;
|
||||||
|
Loading…
Reference in New Issue
Block a user