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

Yes. It is better to use a switch case statement with a default that throws an exception.