typo3temp/compressor is flooded with identical files
If absRefPrefix is set the result of inlineStyle2TempFile is returned with absRefPrefix prepended. If this is a fully qualified URL t3lib_Compressor::createMergedFile() will download the contents to a temporary file on each page. Even though the contents and the filename of this temporary file stay the same the modified timestamp is altered and thus a new merged file is created in typo3temp/compressor/.
In one installation we found 26 GB of identical CSS files.Possible solutions:
- detect if 'external' file is in fact local file and handle it as local
- exclude 'external' files from merge/compress
- option to exclude inlineStyle2TempFile result from merging/compressing (would mean new feature)
Updated by Ivan Dharma Kartolo over 11 years ago
the problem is, that the temporary file (external-xxxx) is always rewritten, even tough the file is not changed. therefore the md5 in createMergedFile function is always changed, since the timestamp of the temporary file is always new.
patch is made against 4.6.12.
the idea is to check if the temporary file exists and the content is the same with the content fetched.
if the file doesn't exist or the content not the same (with the saved one), then write the new file.
can you test is?