From 22767b80af17c3fb82414b61be2c8d68a865758b Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 11 Apr 2011 02:24:39 -0700 Subject: [PATCH] Make files coming out of the Files tool cacheable, since this improves performance (e.g., for profile images) and you need to know a highly entropic PHID to access a file in the first place, plus installs should generally be doing HTTPS. --- .../files/controller/view/PhabricatorFileViewController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/applications/files/controller/view/PhabricatorFileViewController.php b/src/applications/files/controller/view/PhabricatorFileViewController.php index bb1dafda93..54847d76ac 100644 --- a/src/applications/files/controller/view/PhabricatorFileViewController.php +++ b/src/applications/files/controller/view/PhabricatorFileViewController.php @@ -41,6 +41,7 @@ class PhabricatorFileViewController extends PhabricatorFileController { $data = $file->loadFileData(); $response = new AphrontFileResponse(); $response->setContent($data); + $response->setCacheDurationInSeconds(60 * 60 * 24 * 30); if ($this->view == 'view') { if (!$file->isViewableInBrowser()) {