             defer { lock.unlock() }
 
             if let image = newValue {
-                add(node: Node(value: CachedImage(image: image, cost: cost(image), key: key)))
+                add(node: LinkedList.Node(value: CachedImage(image: image, cost: cost(image), key: key)))
                 trim()
             } else {
                 guard let node = map[key] else { return }

        }
    }

    func remove(_ node: Node<V>) {
        node.next?.previous = node.previous // node.previous is nil if node=head
        node.previous?.next = node.next // node.next is nil if node=tail
        if node === head { head = node.next }

public final class Cache: Caching {
    // We don't use `NSCache` because it's not LRU

    private var map = [AnyHashable: LinkedList<CachedImage>.Node]()
    private let list = LinkedList<CachedImage>()
    private let lock = Lock()

