wirte to cache and replace version 1