Saving the cache lazily. This risks orphaning some files so perhaps there needs to be a better mechanism of ensuring this doesn't happen.