update cache automatically in _set()