addes cache for setting keys