Added ability to save cache state