fix bug: Client.cache_dir()

#3672 did not fix it completely