Add equals to cache store.
Fix a few tests.
Merge branch '4.0'