a data storage system and method to promote integrity of data written , optionally using a cache with buffer to persistent memory . health of a computer system is dynamically monitored . if good health is present , during a data write operation , the cache system is configured so data is buffered within the cache , thus promoting faster performance . but if good health is absent , the cache system is configured to write through to persistent memory , thus trading off speed for integrity of the data stored . optionally , a multi - level cache hierarchy system can be used as the caching system .