From: Aaron Schulz Date: Thu, 28 Mar 2019 01:25:46 +0000 (-0700) Subject: Make ApiStashEdit::pruneExcessStashedEntries use user name X-Git-Tag: 1.34.0-rc.0~2279^2 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=a8e088a4d1c70182c71c7735c66c8e94a0b41463;p=lhc%2Fweb%2Fwiklou.git Make ApiStashEdit::pruneExcessStashedEntries use user name Follow up to c334883309778 Change-Id: I35213d83a00b50bb469aab5bf8fbeb52239cff5e --- diff --git a/includes/api/ApiStashEdit.php b/includes/api/ApiStashEdit.php index fe5f6c4a44..51845627a6 100644 --- a/includes/api/ApiStashEdit.php +++ b/includes/api/ApiStashEdit.php @@ -477,7 +477,7 @@ class ApiStashEdit extends ApiBase { * @param string $newKey */ private static function pruneExcessStashedEntries( BagOStuff $cache, User $user, $newKey ) { - $key = $cache->makeKey( 'stash-edit-recent', $user->getId() ); + $key = $cache->makeKey( 'stash-edit-recent', sha1( $user->getName() ) ); $keyList = $cache->get( $key ) ?: []; if ( count( $keyList ) >= self::MAX_CACHE_RECENT ) {