PLT-4853 Adding cache purging to the server (server) (#4735)
* PLT-4853 Adding caching invalidation to HA * PLT-4853 Adding cach purging to the server
Этот коммит содержится в:
коммит произвёл
Harrison Healey
родитель
7acd135e02
Коммит
c4974374d9
@@ -251,8 +251,8 @@ func getAuthorizedApps(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
func RevokeAccessToken(token string) *model.AppError {
|
||||
|
||||
session := GetSession(token)
|
||||
schan := Srv.Store.Session().Remove(token)
|
||||
sessionCache.Remove(token)
|
||||
|
||||
if result := <-Srv.Store.OAuth().GetAccessData(token); result.Err != nil {
|
||||
return model.NewLocAppError("RevokeAccessToken", "api.oauth.revoke_access_token.get.app_error", nil, "")
|
||||
@@ -268,6 +268,10 @@ func RevokeAccessToken(token string) *model.AppError {
|
||||
return model.NewLocAppError("RevokeAccessToken", "api.oauth.revoke_access_token.del_session.app_error", nil, "")
|
||||
}
|
||||
|
||||
if session != nil {
|
||||
RemoveAllSessionsForUserId(session.UserId)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user