Skip to content

Commit

Permalink
Merge pull request collectiveaccess#117 from miqrogroove/patch-2
Browse files Browse the repository at this point in the history
Enabled client-side caching in the IIIF service.
  • Loading branch information
collectiveaccess authored Sep 4, 2024
2 parents 0ae3dda + e43c1d5 commit 923cf8e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/lib/Service/IIIFService.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ class IIIFService {
* @throws Exception
*/
public static function dispatch(string $identifier, RequestHTTP $request, ResponseHTTP $response) {
$response->addHeader('Cache-Control', 'max-age=3600, private', true); // Cache all responses for 1 hour.

$va_path = array_filter(array_slice(explode("/", $request->getPathInfo()), 3), 'strlen');
$vs_key = $identifier."/".join("/", $va_path);

Expand Down

0 comments on commit 923cf8e

Please sign in to comment.