aboutsummaryrefslogtreecommitdiffstats
path: root/staging_vespalib/src/vespa/vespalib/stllike/lrucache_map.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'staging_vespalib/src/vespa/vespalib/stllike/lrucache_map.hpp')
-rw-r--r--staging_vespalib/src/vespa/vespalib/stllike/lrucache_map.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/staging_vespalib/src/vespa/vespalib/stllike/lrucache_map.hpp b/staging_vespalib/src/vespa/vespalib/stllike/lrucache_map.hpp
index d8d55c9b8c4..c8a3db878b8 100644
--- a/staging_vespalib/src/vespa/vespalib/stllike/lrucache_map.hpp
+++ b/staging_vespalib/src/vespa/vespalib/stllike/lrucache_map.hpp
@@ -267,7 +267,7 @@ typename lrucache_map<P>::internal_iterator
lrucache_map<P>::findAndRef(const K & key)
{
internal_iterator found = HashTable::find(key);
- if (found != HashTable::end()) {
+ if (found != HashTable::end() && (size()*2 > capacity())) {
ref(found);
}
return found;