+ if (common_config('site', 'use_x_sendfile')) {
+ return null;
+ }
+
+ $cache = Cache::instance();
+ if($cache) {
+ $key = Cache::key('attachments:etag:' . $this->path);
+ $etag = $cache->get($key);
+ if($etag === false) {
+ $etag = crc32(file_get_contents($this->path));
+ $cache->set($key,$etag);
+ }
+ return $etag;
+ }
+