mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 08:52:39 +01:00
Digest resource cachekeys to maximum length
Summary: Fixes T8372. We currently store the entire resource path in the cachekey; shorten it to a maximum of 64 characters. The key size is 128 and T8372 had an example of a 112-byte key which could run over 128 with a slightly-long cache namespace. Test Plan: - Not 100% sure this is the issue, but it seems likely. - Dumped the cachekey before and after the change. - Saw values like `celerity:/res/1432859262T/phabricator/e2460e8f/core.pkg.css-6eGjUCJORU3j` now. Reviewers: btrahan, chad Reviewed By: chad Subscribers: epriestley Maniphest Tasks: T8372 Differential Revision: https://secure.phabricator.com/D13095
This commit is contained in:
parent
a55c4a651e
commit
7a9174fa21
1 changed files with 1 additions and 1 deletions
|
@ -165,7 +165,7 @@ abstract class CelerityResourceController extends PhabricatorController {
|
|||
}
|
||||
|
||||
private function getCacheKey($path) {
|
||||
return 'celerity:'.$path;
|
||||
return 'celerity:'.PhabricatorHash::digestToLength($path, 64);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue