def update(self, source_file, configuration, declarations, included_files):
<EOL>source_file = os.path.normpath(source_file)<EOL>included_files = [os.path.normpath(p) for p in included_files]<EOL>dependent_files = {}<EOL>for name in [source_file] + included_files:<EOL><INDENT>dependent_files[name] = <NUM_LIT:1><EOL><DEDENT>key = self._create_cache_key(source_file)<EOL>self._remove_entry(source_file, key)<EOL>filesigs = []<EOL>for filename in list(dependent_files.keys()):<EOL><INDENT>id_, sig = self.__filename_rep.acquire_filename(filename)<EOL>filesigs.append((id_, sig))<EOL><DEDENT>configsig = self._create_config_signature(configuration)<EOL>entry = index_entry_t(filesigs, configsig)<EOL>self.__index[key] = entry<EOL>self.__modified_flag = True<EOL>cachefilename = self._create_cache_filename(source_file)<EOL>self._write_file(cachefilename, declarations)<EOL>
Replace a cache entry by a new value.

        :param source_file: a C++ source file name.
        :type source_file: str
        :param configuration: configuration  object.
        :type configuration: :class:`xml_generator_configuration_t`
        :param declarations: declarations contained in the `source_file`
        :type declarations: pickable object
        :param included_files: included files
        :type included_files: list of str