mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-28 16:34:13 +01:00
Don't ask other nodes to invalidate cache when the key is not updated
This commit is contained in:
parent
d5afc767e6
commit
ff06bdf144
@ -547,15 +547,15 @@ db_user_exists(User, Server, Mod) ->
|
|||||||
error ->
|
error ->
|
||||||
case Mod:store_type(Server) of
|
case Mod:store_type(Server) of
|
||||||
external ->
|
external ->
|
||||||
case ets_cache:update(
|
case ets_cache:lookup(
|
||||||
?AUTH_CACHE, {User, Server}, {ok, exists},
|
?AUTH_CACHE, {User, Server},
|
||||||
fun() ->
|
fun() ->
|
||||||
case Mod:user_exists(User, Server) of
|
case Mod:user_exists(User, Server) of
|
||||||
true -> {ok, exists};
|
true -> {ok, exists};
|
||||||
false -> error;
|
false -> error;
|
||||||
{error, _} = Err -> Err
|
{error, _} = Err -> Err
|
||||||
end
|
end
|
||||||
end, cache_nodes(Mod, Server)) of
|
end) of
|
||||||
{ok, _} ->
|
{ok, _} ->
|
||||||
true;
|
true;
|
||||||
error ->
|
error ->
|
||||||
@ -584,7 +584,7 @@ db_check_password(User, AuthzId, Server, ProvidedPassword,
|
|||||||
false ->
|
false ->
|
||||||
error
|
error
|
||||||
end
|
end
|
||||||
end, cache_nodes(Mod, Server)) of
|
end) of
|
||||||
{ok, _} ->
|
{ok, _} ->
|
||||||
true;
|
true;
|
||||||
error ->
|
error ->
|
||||||
|
Loading…
Reference in New Issue
Block a user