{deps, [{lager, ".*", {git, "https://github.com/erlang-lager/lager", "3.6.7"}},
{p1_utils, ".*", {git, "https://github.com/processone/p1_utils", {tag, "1.0.14"}}},
- {cache_tab, ".*", {git, "https://github.com/processone/cache_tab", {tag, "1.0.18"}}},
+ {cache_tab, ".*", {git, "https://github.com/processone/cache_tab", "5079ca9"}},
{fast_tls, ".*", {git, "https://github.com/processone/fast_tls", {tag, "1.1.0"}}},
{stringprep, ".*", {git, "https://github.com/processone/stringprep", {tag, "1.0.15"}}},
{fast_xml, ".*", {git, "https://github.com/processone/fast_xml", {tag, "1.1.35"}}},
{error, _} = Err -> Err
end;
false ->
- Mod:try_register(User, Server, Password1)
+ ets_cache:untag(Mod:try_register(User, Server, Password1))
end;
false ->
{error, not_allowed}
{error, _} = Err -> Err
end;
false ->
- Mod:set_password(User, Server, Password1)
+ ets_cache:untag(Mod:set_password(User, Server, Password1))
end;
false ->
{error, not_allowed}
?AUTH_CACHE, {User, Server},
fun() -> Mod:get_password(User, Server) end);
true ->
- Mod:get_password(User, Server)
+ ets_cache:untag(Mod:get_password(User, Server))
end.
db_user_exists(User, Server, Mod) ->
Err
end;
{external, false} ->
- Mod:user_exists(User, Server);
+ ets_cache:untag(Mod:user_exists(User, Server));
_ ->
false
end
false
end;
{external, false} ->
- Mod:check_password(User, AuthzId, Server, ProvidedPassword);
+ ets_cache:untag(
+ Mod:check_password(User, AuthzId, Server, ProvidedPassword));
_ ->
false
end
db_remove_user(User, Server, Mod) ->
case erlang:function_exported(Mod, remove_user, 2) of
true ->
- case Mod:remove_user(User, Server) of
+ case ets_cache:untag(Mod:remove_user(User, Server)) of
ok ->
case use_cache(Mod, Server) of
true ->
db_get_users(Server, Opts, Mod) ->
case erlang:function_exported(Mod, get_users, 2) of
true ->
- Mod:get_users(Server, Opts);
+ ets_cache:untag(Mod:get_users(Server, Opts));
false ->
case use_cache(Mod, Server) of
true ->
db_count_users(Server, Opts, Mod) ->
case erlang:function_exported(Mod, count_users, 2) of
true ->
- Mod:count_users(Server, Opts);
+ ets_cache:untag(Mod:count_users(Server, Opts));
false ->
case use_cache(Mod, Server) of
true ->