summaryrefslogtreecommitdiff
path: root/items.c
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2017-02-05 17:15:28 -0800
committerdormando <dormando@rydia.net>2017-02-05 17:15:28 -0800
commit74dc5ee312cd1828d17fa42a7967a5d4fa0c4332 (patch)
treeea3ca28928701541d19aba2118e11f1e9607b337 /items.c
parentd67cfbf9922f7f4be6ee7315b0877c796b182e7d (diff)
downloadmemcached-74dc5ee312cd1828d17fa42a7967a5d4fa0c4332.tar.gz
allow TEMP_LRU to work with flat LRU.
Diffstat (limited to 'items.c')
-rw-r--r--items.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/items.c b/items.c
index 579548c..b5f1fe9 100644
--- a/items.c
+++ b/items.c
@@ -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;