fix getAll() returns data instead of object when nearcache enabled.
Merge pull request #1944 from eminn/fix/NearCacheSerialization

fix getAll() returns data instead of object when nearcache enabled.