X-Git-Url: https://git.camperquake.de/gitweb.cgi?p=videosite.git;a=blobdiff_plain;f=libvideosite.pm;fp=libvideosite.pm;h=c39d9e5c79b8cd8bfdffadeb41810440c9f64028;hp=e4e1878fb6ec9013cafb4f06492e7aeba5dc483f;hb=1dd46d87d78c3cac2732ba942f4412f3a168a837;hpb=f1950abbacdeb7e72c1303fc02d58d01b622e833 diff --git a/libvideosite.pm b/libvideosite.pm index e4e1878..c39d9e5 100644 --- a/libvideosite.pm +++ b/libvideosite.pm @@ -127,8 +127,8 @@ my $videosite_commands = { _cmd_nodebug(@_); }, - 'cache' => sub { - _cmd_cache(@_); + 'service' => sub { + _cmd_service(@_); }, }; @@ -931,9 +931,24 @@ sub _cmd_nodebug { } # +# Handle generic service commands +# +sub _cmd_service { + my $event = shift; + my $subcmd = shift || ''; + + $subcmd = lc($subcmd); + + if ($subcmd eq 'cache') { + _cmd_service_cache($event, @_); + } +} + + +# # Display or clear the content of the config cache # -sub _cmd_cache { +sub _cmd_service_cache { my $event = shift; my $subcmd = shift; @@ -950,8 +965,8 @@ sub _cmd_cache { } } } elsif ($subcmd eq 'clear') { - _debug("Clearing config cache"); %config_cache = (); + _io("Cache cleared"); } }