Fixes #1186.
Moved near-cache clear process to clear operation. Added basic near-cache test.
Cleanup.
Merge pull request #1191 from mdogan/fix/3.2/issue-1186

Fix/3.2/issue 1186