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

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