Off-heap cache with fast serialization