1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-03-04 08:29:18 +01:00

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.
This commit is contained in:
epriestley 2011-04-11 02:24:39 -07:00
parent 675ce22bf4
commit 22767b80af

View file

@ -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()) {