add support for in flight message caching to PS