milvus/cpp/src/cache/CpuCacheMgr.cpp
groot 9f35b62289 fix cache manager bug
Former-commit-id: d1b7f43865f6e0a059081531e1549a975c86d4aa
2019-04-26 19:45:26 +08:00

23 lines
767 B
C++

////////////////////////////////////////////////////////////////////////////////
// Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved
// Unauthorized copying of this file, via any medium is strictly prohibited.
// Proprietary and confidential.
////////////////////////////////////////////////////////////////////////////////
#include "CpuCacheMgr.h"
#include "server/ServerConfig.h"
namespace zilliz {
namespace vecwise {
namespace cache {
CpuCacheMgr::CpuCacheMgr() {
server::ConfigNode& config = server::ServerConfig::GetInstance().GetConfig(server::CONFIG_CACHE);
int64_t cap = config.GetInt64Value(server::CONFIG_CPU_CACHE_CAPACITY, 16);
cap *= 1024*1024*1024;
cache_ = std::make_shared<Cache>(cap, 1UL<<32);
}
}
}
}