Hi we have an issue with using CDN on top of getimage.ashx URL's.
Issue: Images are not updated in the CDN
We have a suspect and that is the Etag header. When the image is modified the Etag-header doesn't change, because the Etag checksum is built only taking parameters into the checksum.
Inside the Dynamicweb.ImageHandling.ConvertParameteres.vb class there's a GetHash
inputStr = Base.ChkString(CacheFolder) If Not IsNothing(FileData) Then inputStr &= FileData.ToString() End If inputStr &= Base.ChkString(SourceFile) inputStr &= Base.ChkString(TargetFile) inputStr &= Format.ToString() inputStr &= Width.ToString() inputStr &= Height.ToString() inputStr &= Resolution.ToString() inputStr &= Quality.ToString() inputStr &= ColorDepth.ToString() inputStr &= ColorMode.ToString() inputStr &= CropMode.ToString() inputStr &= DoNotResize.ToString() inputStr &= ColorTranslator.ToHtml(BackgroundColor) _hash = Base.MD5HashToString(inputStr)
Since the "FileData" is empty as far as I can trace back.
We'd need a LastModified into that hash
inputStr = Base.ChkString(CacheFolder)
If Not IsNothing(FileData) Then
inputStr &= FileData.ToString()
End If
inputStr &= Base.ChkString(SourceFile)
inputStr &= Base.ChkString(TargetFile)
inputStr &= Format.ToString()
inputStr &= Width.ToString()
inputStr &= Height.ToString()
inputStr &= Resolution.ToString()
inputStr &= Quality.ToString()
inputStr &= ColorDepth.ToString()
inputStr &= ColorMode.ToString()
inputStr &= CropMode.ToString()
inputStr &= DoNotResize.ToString()
inputStr &= ColorTranslator.ToHtml(BackgroundColor)
Dim fInfo As IO.FileInfo = New IO.FileInfo(SourceFile)
inputStr &= fInfo.LastWriteTime.ToFileTime().ToString()
_hash = Base.MD5HashToString(inputStr)