'Save a new cache entry with *key* and *data*.'

def save(self, key, data):

    overloads = self._load_index()
    try:
        data_name = overloads[key]
    except KeyError:
        existing = set(overloads.values())
        for i in itertools.count(1):
            data_name = self._data_name(i)
            if (data_name not in existing):
                break
        overloads[key] = data_name
        self._save_index(overloads)
    self._save_data(data_name, data)
