Provide updateOrStore method.

Change-Id: I352d6baa3a90974ae5fdb243cf253522d807251c