<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update(self, rid, data, raise_on_error=True):
 """Write updated cache data to the DataStore. Args: rid (str):
 The record identifier. data (dict):
 The record data. raise_on_error (bool):
 If True and not r.ok this method will raise a RunTimeError. Returns: object : Python request response. """

        cache_data = {'cache-date': self._dt_to_epoch(datetime.now()), 'cache-data': data}
        return self.ds.put(rid, cache_data, raise_on_error)