git://git.camperquake.de
/
videosite.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f1950ab
)
libvideosite: introduce sevice command and move cache command under it
author
Ralf Ertzinger
<ralf@skytale.net>
Sat, 29 Jun 2013 16:02:30 +0000
(18:02 +0200)
committer
Ralf Ertzinger
<ralf@skytale.net>
Sat, 29 Jun 2013 16:02:30 +0000
(18:02 +0200)
libvideosite.pm
patch
|
blob
|
history
diff --git
a/libvideosite.pm
b/libvideosite.pm
index
e4e1878
..
c39d9e5
100644
(file)
--- a/
libvideosite.pm
+++ b/
libvideosite.pm
@@
-127,8
+127,8
@@
my $videosite_commands = {
_cmd_nodebug(@_);
},
_cmd_nodebug(@_);
},
- '
cach
e' => sub {
- _cmd_
cach
e(@_);
+ '
servic
e' => sub {
+ _cmd_
servic
e(@_);
},
};
},
};
@@
-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
#
# Display or clear the content of the config cache
#
-sub _cmd_cache {
+sub _cmd_
service_
cache {
my $event = shift;
my $subcmd = shift;
my $event = shift;
my $subcmd = shift;
@@
-950,8
+965,8
@@
sub _cmd_cache {
}
}
} elsif ($subcmd eq 'clear') {
}
}
} elsif ($subcmd eq 'clear') {
- _debug("Clearing config cache");
%config_cache = ();
%config_cache = ();
+ _io("Cache cleared");
}
}
}
}