Ticket #290: cache.diff

File cache.diff, 414 bytes (added by jinmei, 9 years ago)
  • cache.cc

     
    240240    if (node->lru_entry_ == lru_.begin()) {
    241241        return;
    242242    }
    243     lru_.erase(node->lru_entry_);
    244     lru_.push_front(node);
     243    lru_.splice(lru_.begin(), lru_, node->lru_entry_); // move node to front
    245244    node->lru_entry_ = lru_.begin();
    246245}
    247246