1. A computer program product for caching data from a storage device managed by a storage server in a cache device providing non-volatile storage, the computer program product comprising a computer readable storage medium having computer readable program code embodied therein that is executable to perform operations, the operations comprising: generating fragment metadata for each fragment of data from the storage server stored in the cache device; writing the fragment metadata to at least one chunk of storage in the cache device in a metadata directory in the cache device; for each of the at least one chunk in the cache device to which the fragment metadata is written, generating chunk metadata for the chunk and writing the generated chunk metadata to the metadata directory in the cache device; writing header metadata having information on access of the storage server to the metadata directory in the cache device; and using the written header metadata, chunk metadata, and fragment metadata to validate the metadata directory and the fragment data in the cache device during a restart operation.