| 136 | } |
| 137 | |
| 138 | void DirIvCache::update_lru(DirIvCacheNode *node) |
| 139 | { |
| 140 | // if node isn't already at front of list, remove |
| 141 | // it from wherever it was and put it at the front |
| 142 | |
| 143 | if (node->m_list_it != m_lru_list.begin()) { |
| 144 | m_lru_list.erase(node->m_list_it); |
| 145 | m_lru_list.push_front(node); |
| 146 | node->m_list_it = m_lru_list.begin(); |
| 147 | } |
| 148 | } |
| 149 | |
| 150 | bool DirIvCache::lookup(LPCWSTR path, unsigned char *dir_iv) |
| 151 | { |