cache design - write