Extract cache
Set cache entry after success rather than removing after failure