diff options
author | dormando <dormando@rydia.net> | 2017-02-05 17:15:28 -0800 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2017-02-05 17:15:28 -0800 |
commit | 74dc5ee312cd1828d17fa42a7967a5d4fa0c4332 (patch) | |
tree | ea3ca28928701541d19aba2118e11f1e9607b337 /items.c | |
parent | d67cfbf9922f7f4be6ee7315b0877c796b182e7d (diff) | |
download | memcached-74dc5ee312cd1828d17fa42a7967a5d4fa0c4332.tar.gz |
allow TEMP_LRU to work with flat LRU.
Diffstat (limited to 'items.c')
-rw-r--r-- | items.c | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -249,13 +249,11 @@ item *do_item_alloc(char *key, const size_t nkey, const unsigned int flags, /* Items are initially loaded into the HOT_LRU. This is '0' but I want at * least a note here. Compiler (hopefully?) optimizes this out. */ - if (settings.lru_segmented) { - if (settings.temp_lru && - exptime - current_time <= settings.temporary_ttl) { - id |= TEMP_LRU; - } else { - id |= HOT_LRU; - } + if (settings.temp_lru && + exptime - current_time <= settings.temporary_ttl) { + id |= TEMP_LRU; + } else if (settings.lru_segmented) { + id |= HOT_LRU; } else { /* There is only COLD in compat-mode */ id |= COLD_LRU; |