Changeset 418 for branches/performance
- Timestamp:
- 10/15/06 08:45:01 (3 years ago)
- Files:
-
- 1 modified
-
branches/performance/server/items.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/performance/server/items.c
r415 r418 20 20 #include "memcached.h" 21 21 22 /* 23 * We only reposition items in the LRU queue if they haven't been repositioned 24 * in this many seconds. That saves us from churning on frequently-accessed 25 * items. 26 */ 27 #define ITEM_UPDATE_INTERVAL 60 22 28 23 29 #define LARGEST_ID 255 … … 217 223 218 224 void item_update(item *it) { 219 assert((it->it_flags & ITEM_SLABBED) == 0); 220 221 item_unlink_q(it); 222 it->time = current_time; 223 item_link_q(it); 225 if (it->time < current_time - ITEM_UPDATE_INTERVAL) { 226 assert((it->it_flags & ITEM_SLABBED) == 0); 227 228 item_unlink_q(it); 229 it->time = current_time; 230 item_link_q(it); 231 } 224 232 } 225 233
