With this pr, map.clear operation clears client nearcache. fixes #2363

this can be in the "else" branch