Added caching of serialized data.