Differential Diff 2286
Diff 2286
Diff 2286
Properties
Properties
Path | Size | Packages | |||
---|---|---|---|---|---|
| |||||
| |||||
| |||||
39 lines | O1: Blessed Committers | ||||
| |||||
59 lines | O1: Blessed Committers | ||||
| |||||
1 line | O1: Blessed Committers | ||||
| |||||
34 lines | O1: Blessed Committers |
Diff 2286
Diff 2286
src/applications/config/custom/PhabricatorCustomLogoConfigType.php
Show First 20 Lines • Show All 53 Lines • ▼ Show 20 Lines | protected function serveResource(array $spec) { | ||||
$is_locally_cacheable = $this->isLocallyCacheableResourceType($type); | $is_locally_cacheable = $this->isLocallyCacheableResourceType($type); | ||||
if (AphrontRequest::getHTTPHeader('If-Modified-Since') && $is_cacheable) { | if (AphrontRequest::getHTTPHeader('If-Modified-Since') && $is_cacheable) { | ||||
// Return a "304 Not Modified". We don't care about the value of this | // Return a "304 Not Modified". We don't care about the value of this | ||||
// field since we never change what resource is served by a given URI. | // field since we never change what resource is served by a given URI. | ||||
return $this->makeResponseCacheable(new Aphront304Response()); | return $this->makeResponseCacheable(new Aphront304Response()); | ||||
} | } | ||||
$cache = null; | $cache = null; | ||||
$cache_key = null; | |||||
$data = null; | $data = null; | ||||
if ($is_cacheable && $is_locally_cacheable && !$dev_mode) { | if ($is_cacheable && $is_locally_cacheable && !$dev_mode) { | ||||
$cache = PhabricatorCaches::getImmutableCache(); | $cache = PhabricatorCaches::getImmutableCache(); | ||||
$request_path = $this->getRequest()->getPath(); | $request_path = $this->getRequest()->getPath(); | ||||
$cache_key = $this->getCacheKey($request_path); | $cache_key = $this->getCacheKey($request_path); | ||||
$data = $cache->getKey($cache_key); | $data = $cache->getKey($cache_key); | ||||
Show All 23 Lines | if ($data === null) { | ||||
} | } | ||||
} | } | ||||
$xformer = $this->buildResourceTransformer(); | $xformer = $this->buildResourceTransformer(); | ||||
if ($xformer) { | if ($xformer) { | ||||
$data = $xformer->transformResource($path, $data); | $data = $xformer->transformResource($path, $data); | ||||
} | } | ||||
if ($cache) { | if ($cache && $cache_key !== null) { | ||||
valerio.bozzolan: And, maybe this line | |||||
$cache->setKey($cache_key, $data); | $cache->setKey($cache_key, $data); | ||||
} | } | ||||
} | } | ||||
$response = id(new AphrontFileResponse()) | $response = id(new AphrontFileResponse()) | ||||
->setMimeType($type_map[$type]); | ->setMimeType($type_map[$type]); | ||||
// The "Content-Security-Policy" header has no effect on the actual | // The "Content-Security-Policy" header has no effect on the actual | ||||
▲ Show 20 Lines • Show All 103 Lines • Show Last 20 Lines |
src/applications/maniphest/controller/ManiphestTaskDetailController.php
Show First 20 Lines • Show All 53 Lines • ▼ Show 20 Lines | protected function serveResource(array $spec) { | ||||||||||
$is_locally_cacheable = $this->isLocallyCacheableResourceType($type); | $is_locally_cacheable = $this->isLocallyCacheableResourceType($type); | ||||||||||
if (AphrontRequest::getHTTPHeader('If-Modified-Since') && $is_cacheable) { | if (AphrontRequest::getHTTPHeader('If-Modified-Since') && $is_cacheable) { | ||||||||||
// Return a "304 Not Modified". We don't care about the value of this | // Return a "304 Not Modified". We don't care about the value of this | ||||||||||
// field since we never change what resource is served by a given URI. | // field since we never change what resource is served by a given URI. | ||||||||||
return $this->makeResponseCacheable(new Aphront304Response()); | return $this->makeResponseCacheable(new Aphront304Response()); | ||||||||||
} | } | ||||||||||
$cache = null; | $cache = null; | ||||||||||
$cache_key = null; | |||||||||||
$data = null; | $data = null; | ||||||||||
if ($is_cacheable && $is_locally_cacheable && !$dev_mode) { | if ($is_cacheable && $is_locally_cacheable && !$dev_mode) { | ||||||||||
$cache = PhabricatorCaches::getImmutableCache(); | $cache = PhabricatorCaches::getImmutableCache(); | ||||||||||
$request_path = $this->getRequest()->getPath(); | $request_path = $this->getRequest()->getPath(); | ||||||||||
$cache_key = $this->getCacheKey($request_path); | $cache_key = $this->getCacheKey($request_path); | ||||||||||
$data = $cache->getKey($cache_key); | $data = $cache->getKey($cache_key); | ||||||||||
Show All 23 Lines | if ($data === null) { | ||||||||||
} | } | ||||||||||
} | } | ||||||||||
$xformer = $this->buildResourceTransformer(); | $xformer = $this->buildResourceTransformer(); | ||||||||||
if ($xformer) { | if ($xformer) { | ||||||||||
$data = $xformer->transformResource($path, $data); | $data = $xformer->transformResource($path, $data); | ||||||||||
} | } | ||||||||||
if ($cache) { | if ($cache && $cache_key !== null) { | ||||||||||
Done Inline Actions
And, maybe this line valerio.bozzolan: And, maybe this line | |||||||||||
$cache->setKey($cache_key, $data); | $cache->setKey($cache_key, $data); | ||||||||||
} | } | ||||||||||
} | } | ||||||||||
$response = id(new AphrontFileResponse()) | $response = id(new AphrontFileResponse()) | ||||||||||
->setMimeType($type_map[$type]); | ->setMimeType($type_map[$type]); | ||||||||||
// The "Content-Security-Policy" header has no effect on the actual | // The "Content-Security-Policy" header has no effect on the actual | ||||||||||
▲ Show 20 Lines • Show All 103 Lines • Show Last 20 Lines |
src/view/page/PhabricatorStandardPageView.php
Show First 20 Lines • Show All 53 Lines • ▼ Show 20 Lines | protected function serveResource(array $spec) { | ||||||||||
$is_locally_cacheable = $this->isLocallyCacheableResourceType($type); | $is_locally_cacheable = $this->isLocallyCacheableResourceType($type); | ||||||||||
if (AphrontRequest::getHTTPHeader('If-Modified-Since') && $is_cacheable) { | if (AphrontRequest::getHTTPHeader('If-Modified-Since') && $is_cacheable) { | ||||||||||
// Return a "304 Not Modified". We don't care about the value of this | // Return a "304 Not Modified". We don't care about the value of this | ||||||||||
// field since we never change what resource is served by a given URI. | // field since we never change what resource is served by a given URI. | ||||||||||
return $this->makeResponseCacheable(new Aphront304Response()); | return $this->makeResponseCacheable(new Aphront304Response()); | ||||||||||
} | } | ||||||||||
$cache = null; | $cache = null; | ||||||||||
$cache_key = null; | |||||||||||
$data = null; | $data = null; | ||||||||||
if ($is_cacheable && $is_locally_cacheable && !$dev_mode) { | if ($is_cacheable && $is_locally_cacheable && !$dev_mode) { | ||||||||||
$cache = PhabricatorCaches::getImmutableCache(); | $cache = PhabricatorCaches::getImmutableCache(); | ||||||||||
$request_path = $this->getRequest()->getPath(); | $request_path = $this->getRequest()->getPath(); | ||||||||||
$cache_key = $this->getCacheKey($request_path); | $cache_key = $this->getCacheKey($request_path); | ||||||||||
$data = $cache->getKey($cache_key); | $data = $cache->getKey($cache_key); | ||||||||||
Show All 23 Lines | if ($data === null) { | ||||||||||
} | } | ||||||||||
} | } | ||||||||||
$xformer = $this->buildResourceTransformer(); | $xformer = $this->buildResourceTransformer(); | ||||||||||
if ($xformer) { | if ($xformer) { | ||||||||||
$data = $xformer->transformResource($path, $data); | $data = $xformer->transformResource($path, $data); | ||||||||||
} | } | ||||||||||
if ($cache) { | if ($cache && $cache_key !== null) { | ||||||||||
Done Inline Actions
And, maybe this line valerio.bozzolan: And, maybe this line | |||||||||||
$cache->setKey($cache_key, $data); | $cache->setKey($cache_key, $data); | ||||||||||
} | } | ||||||||||
} | } | ||||||||||
$response = id(new AphrontFileResponse()) | $response = id(new AphrontFileResponse()) | ||||||||||
->setMimeType($type_map[$type]); | ->setMimeType($type_map[$type]); | ||||||||||
// The "Content-Security-Policy" header has no effect on the actual | // The "Content-Security-Policy" header has no effect on the actual | ||||||||||
▲ Show 20 Lines • Show All 103 Lines • Show Last 20 Lines |
src/view/page/menu/PhabricatorMainMenuView.php
Show First 20 Lines • Show All 53 Lines • ▼ Show 20 Lines | protected function serveResource(array $spec) { | ||||||||||
$is_locally_cacheable = $this->isLocallyCacheableResourceType($type); | $is_locally_cacheable = $this->isLocallyCacheableResourceType($type); | ||||||||||
if (AphrontRequest::getHTTPHeader('If-Modified-Since') && $is_cacheable) { | if (AphrontRequest::getHTTPHeader('If-Modified-Since') && $is_cacheable) { | ||||||||||
// Return a "304 Not Modified". We don't care about the value of this | // Return a "304 Not Modified". We don't care about the value of this | ||||||||||
// field since we never change what resource is served by a given URI. | // field since we never change what resource is served by a given URI. | ||||||||||
return $this->makeResponseCacheable(new Aphront304Response()); | return $this->makeResponseCacheable(new Aphront304Response()); | ||||||||||
} | } | ||||||||||
$cache = null; | $cache = null; | ||||||||||
$cache_key = null; | |||||||||||
$data = null; | $data = null; | ||||||||||
if ($is_cacheable && $is_locally_cacheable && !$dev_mode) { | if ($is_cacheable && $is_locally_cacheable && !$dev_mode) { | ||||||||||
$cache = PhabricatorCaches::getImmutableCache(); | $cache = PhabricatorCaches::getImmutableCache(); | ||||||||||
$request_path = $this->getRequest()->getPath(); | $request_path = $this->getRequest()->getPath(); | ||||||||||
$cache_key = $this->getCacheKey($request_path); | $cache_key = $this->getCacheKey($request_path); | ||||||||||
$data = $cache->getKey($cache_key); | $data = $cache->getKey($cache_key); | ||||||||||
Show All 23 Lines | if ($data === null) { | ||||||||||
} | } | ||||||||||
} | } | ||||||||||
$xformer = $this->buildResourceTransformer(); | $xformer = $this->buildResourceTransformer(); | ||||||||||
if ($xformer) { | if ($xformer) { | ||||||||||
$data = $xformer->transformResource($path, $data); | $data = $xformer->transformResource($path, $data); | ||||||||||
} | } | ||||||||||
if ($cache) { | if ($cache && $cache_key !== null) { | ||||||||||
Done Inline Actions
And, maybe this line valerio.bozzolan: And, maybe this line | |||||||||||
$cache->setKey($cache_key, $data); | $cache->setKey($cache_key, $data); | ||||||||||
} | } | ||||||||||
} | } | ||||||||||
$response = id(new AphrontFileResponse()) | $response = id(new AphrontFileResponse()) | ||||||||||
->setMimeType($type_map[$type]); | ->setMimeType($type_map[$type]); | ||||||||||
// The "Content-Security-Policy" header has no effect on the actual | // The "Content-Security-Policy" header has no effect on the actual | ||||||||||
▲ Show 20 Lines • Show All 103 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0
And, maybe this line