Fixed wrong parameter of Cache::write