X-Git-Url: https://git.camperquake.de/gitweb.cgi?p=videosite.git;a=blobdiff_plain;f=libvideosite.pm;fp=libvideosite.pm;h=3f05160b27d29f52d5463b540ace51f8c7f4ffd5;hp=3554201c814b7b05694bb2916960a326b4e94c2b;hb=167451c83ed861c4d45b80a4b20926487be56932;hpb=ae02b5f92b84fc5e6cba1986dcce7d2a7a7f5aa1 diff --git a/libvideosite.pm b/libvideosite.pm index 3554201..3f05160 100644 --- a/libvideosite.pm +++ b/libvideosite.pm @@ -931,14 +931,27 @@ sub _cmd_nodebug { } # -# Display the content of the config cache +# Display or clear the content of the config cache # sub _cmd_cache { my $event = shift; + my $subcmd = shift; + + $subcmd = 'list' unless defined($subcmd); + $subcmd = lc($subcmd); - _io("Content of config cache:"); - foreach (sort(keys(%config_cache))) { - _io("%s => %s", $_, Dumper($config_cache{$_})); + if ($subcmd eq 'list') { + _io("Content of config cache:"); + foreach (sort(keys(%config_cache))) { + if (exists($config_cache{$_}->{value})) { + _io("%s => %s", $_, $config_cache{$_}->{value}); + } else { + _io("%s present", $_); + } + } + } elsif ($subcmd eq 'clear') { + _debug("Clearing config cache"); + %config_cache = (); } }