Lines Matching refs:cachekey
117 int32_t DailyController::GetThreshold(const CacheKey& cachekey, int32_t type)
119 if (cache_.find(cachekey) != cache_.end()) {
120 return cache_[cachekey].threshold;
122 int32_t threshold = config_->GetThreshold(cachekey.first, cachekey.second, type);
130 int32_t DailyController::GetCount(const CacheKey& cachekey)
132 if (cache_.find(cachekey) != cache_.end()) {
133 return cache_[cachekey].count;
137 .domain = cachekey.first,
138 .name = cachekey.second,
147 void DailyController::UpdateCacheAndDb(const CacheKey& cachekey, int32_t threshold, int32_t count)
154 cachekey.first.c_str(), cachekey.second.c_str());
157 UpdateCache(cachekey, threshold, count, exceedTime);
158 UpdateDb(cachekey, count, exceedTime);
161 void DailyController::UpdateCache(const CacheKey& cachekey, int32_t threshold, int32_t count, int64_t exceedTime)
163 if (cache_.find(cachekey) == cache_.end()) {
164 cache_[cachekey] = {
172 cache_[cachekey].count = count;
174 cache_[cachekey].exceedTime = exceedTime;
178 void DailyController::UpdateDb(const CacheKey& cachekey, int32_t count, int64_t exceedTime)
183 .domain = cachekey.first,
184 .name = cachekey.second,