If the key exists then get it's value. Otherwise put the key and value in the db and then get the value.