equal
deleted
inserted
replaced
186 |
186 |
187 //---------------------------------------------------------------------- |
187 //---------------------------------------------------------------------- |
188 bool |
188 bool |
189 BPQCache::create_cache_entry(Bundle* bundle, BPQBlock* block, std::string key) |
189 BPQCache::create_cache_entry(Bundle* bundle, BPQBlock* block, std::string key) |
190 { |
190 { |
191 if (cache_size_ < bundle->payload().length()) { |
191 if (max_cache_size_ < bundle->payload().length()) { |
192 log_warn("bundle too large to add to cache {cache size: %u, bundle size: %u}", |
192 log_warn("bundle too large to add to cache {max cache size: %u, bundle size: %u}", |
193 cache_size_, bundle->payload().length()); |
193 max_cache_size_, bundle->payload().length()); |
194 |
194 |
195 return false; |
195 return false; |
196 } |
196 } |
197 |
197 |
198 if ( bundle->is_fragment() ) { |
198 if ( bundle->is_fragment() ) { |
262 bool |
262 bool |
263 BPQCache::append_cache_entry(BPQCacheEntry* entry, Bundle* bundle, std::string key) |
263 BPQCache::append_cache_entry(BPQCacheEntry* entry, Bundle* bundle, std::string key) |
264 { |
264 { |
265 ASSERT( bundle->is_fragment() ); |
265 ASSERT( bundle->is_fragment() ); |
266 |
266 |
267 if (cache_size_ < bundle->payload().length()) { |
267 if (max_cache_size_ < bundle->payload().length()) { |
268 log_warn("bundle too large to add to cache {cache size: %u, bundle size: %u}", |
268 log_warn("bundle too large to add to cache {max cache size: %u, bundle size: %u}", |
269 cache_size_, bundle->payload().length()); |
269 max_cache_size_, bundle->payload().length()); |
270 |
270 |
271 return false; |
271 return false; |
272 } |
272 } |
273 |
273 |
274 log_debug("appending received bundle fragment to cache {offset: %u, length: %u}", |
274 log_debug("appending received bundle fragment to cache {offset: %u, length: %u}", |