Fixes #1186.

Added near-cache clear process to clear operation. Added basic near-cache test.