An Etag is a hash or "fingerprint" of the binary content of a file, and is normally used for comparison of two versions of a file to determine whether they are the same without comparing every byte. This can avoid unnecessary transfers of files that have already been transferred, and enable efficient comparison of large files.
The Cascade "freshness" method reduces server requests by using cached values when the time since the last request is less than the "freshness" seconds. Ths means there will still be server requests when serverside values have not changed, which is hard or possible to avoid, and isn't normally a great cost considering the reduction achieved by caching. However it is different for blobs because they can be of a very large size. ETags provide an effective method to eliminate repeat binary downloads of the same file content.
Once implemented correctly, ETags are invisible to Cascade application code except for the performance increase in avoiding repeat downloads of the same binary content.
The sequence for ETag support in Cascade goes like this :
For ETags to work :
1) the blob cache must store and return OpResponse.ETag (FileBlobCache does) 2) the ICascadeOrigin implementation must pass RequestOp.ETag to the blob server, and return the ETag from the blob server in OpResponse.ETag correctly