read-cache: new API write_locked_index instead of write_index/write_cache