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:
parent
b869e742b9
commit
58ea40ad64
1 changed files with 5 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue