fix link cache code with std::map