From a8e088a4d1c70182c71c7735c66c8e94a0b41463 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 27 Mar 2019 18:25:46 -0700 Subject: [PATCH] Make ApiStashEdit::pruneExcessStashedEntries use user name Follow up to c334883309778 Change-Id: I35213d83a00b50bb469aab5bf8fbeb52239cff5e --- includes/api/ApiStashEdit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ) { -- 2.20.1