Made free_node aware of the cache