'Write the cached data back out.
The multistore must be locked.'

def _write(self):

    raw_data = {'file_version': 1}
    raw_creds = []
    raw_data['data'] = raw_creds
    for (cred_key, cred) in self._data.items():
        raw_key = {'clientId': cred_key[0], 'userAgent': cred_key[1], 'scope': cred_key[2]}
        raw_cred = simplejson.loads(cred.to_json())
        raw_creds.append({'key': raw_key, 'credential': raw_cred})
    self._locked_json_write(raw_data)
