adding serialize option to memory store to control serialization