|
|
|
@ -191,6 +191,7 @@ function islandora_view_datastream_cache_check(AbstractDatastream $datastream) {
|
|
|
|
|
* The datastream being viewed/downloaded. |
|
|
|
|
*/ |
|
|
|
|
function islandora_view_datastream_set_cache_headers(AbstractDatastream $datastream) { |
|
|
|
|
if (variable_get('islandora_use_datastream_cache_headers', TRUE)) { |
|
|
|
|
// Force cache revalidation. |
|
|
|
|
header('Expires: Sun, 19 Nov 1978 05:00:00 GMT'); |
|
|
|
|
$cache_control = array(); |
|
|
|
@ -207,6 +208,11 @@ function islandora_view_datastream_set_cache_headers(AbstractDatastream $datastr
|
|
|
|
|
if (isset($datastream->checksum)) { |
|
|
|
|
header("Etag: \"{$datastream->checksum}\""); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
header_remove('Cache-Control'); |
|
|
|
|
header_remove('Expires'); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|