1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +01:00

Hash Diffusion README cachekey components

Without this, we end up with an overlong cache key in some cases.

Auditors: chad
This commit is contained in:
epriestley 2016-12-06 10:03:10 -08:00
parent b869e742b9
commit 58ea40ad64

View file

@ -344,11 +344,14 @@ abstract class DiffusionController extends PhabricatorController {
$repository_phid = $repository->getPHID();
$stable_commit = $drequest->getStableCommit();
$stable_commit_hash = PhabricatorHash::digestForIndex($stable_commit);
$readme_path_hash = PhabricatorHash::digestForindex($readme_path);
$cache = PhabricatorCaches::getMutableStructureCache();
$cache_key = "diffusion".
".repository({$repository_phid})".
".commit({$stable_commit})".
".readme({$readme_path})";
".commit({$stable_commit_hash})".
".readme({$readme_path_hash})";
$readme_cache = $cache->getKey($cache_key);
if (!$readme_cache) {