From fdb713b76d28843480aef787ee8074b9779412d0 Mon Sep 17 00:00:00 2001 From: yystopf Date: Mon, 9 Jan 2023 15:14:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=EF=BC=9A=E6=9B=B4=E6=94=B9?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E9=82=AE=E7=AE=B1=E7=A7=BB=E9=99=A4=E6=97=A7?= =?UTF-8?q?=E7=9A=84cache?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/api/v1/users/update_email_service.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/services/api/v1/users/update_email_service.rb b/app/services/api/v1/users/update_email_service.rb index d17f101fd..d2d5fd735 100644 --- a/app/services/api/v1/users/update_email_service.rb +++ b/app/services/api/v1/users/update_email_service.rb @@ -31,6 +31,7 @@ class Api::V1::Users::UpdateEmailService < ApplicationService change_user_email excute_data_to_gitea excute_change_email_from_gitea + remove_old_cache_for_user end return gitea_data @@ -68,4 +69,8 @@ class Api::V1::Users::UpdateEmailService < ApplicationService $gitea_client.delete_user_emails({body: {emails: [@old_mail]}.to_json, query: request_params}) $gitea_client.post_user_emails({body: {emails: [@mail]}.to_json, query: request_params}) end + + def remove_old_cache_for_user + $redis_cache.hdel("v2-owner-common:#{@user.login}-#{@old_mail}") + end end \ No newline at end of file