{deps, [{lager, ".*", {git, "https://github.com/basho/lager", {tag, "3.2.1"}}},
{p1_utils, ".*", {git, "https://github.com/processone/p1_utils", {tag, "1.0.8"}}},
- {cache_tab, ".*", {git, "https://github.com/processone/cache_tab", "8985b03"}},
+ {cache_tab, ".*", {git, "https://github.com/processone/cache_tab", "b0c787a"}},
{fast_tls, ".*", {git, "https://github.com/processone/fast_tls", {tag, "1.0.11"}}},
{stringprep, ".*", {git, "https://github.com/processone/stringprep", {tag, "1.0.8"}}},
{fast_xml, ".*", {git, "https://github.com/processone/fast_xml", {tag, "1.1.21"}}},
dump_to_textfile/1, dump_to_textfile/2,
mnesia_change_nodename/4,
restore/1, % Still used by some modules
+ clear_cache/0,
get_commands_spec/0
]).
%% gen_server callbacks
module = ?MODULE, function = install_fallback_mnesia,
args_desc = ["Full path to the fallback file"],
args_example = ["/var/lib/ejabberd/database.fallback"],
- args = [{file, string}], result = {res, restuple}}
+ args = [{file, string}], result = {res, restuple}},
+ #ejabberd_commands{name = clear_cache, tags = [server],
+ desc = "Clear database cache on all nodes",
+ module = ?MODULE, function = clear_cache,
+ args = [], result = {res, rescode}}
].
{[Other], Acc}
end,
mnesia:traverse_backup(Source, Target, Convert, switched).
+
+clear_cache() ->
+ Nodes = ejabberd_cluster:get_nodes(),
+ lists:foreach(fun(T) -> ets_cache:clear(T, Nodes) end, ets_cache:all()).