Presumably the cache_lock must be held when calling this function?