Skip to content

Commit

Permalink
doc: run command cache
Browse files Browse the repository at this point in the history
  • Loading branch information
frankiejol committed May 25, 2023
1 parent fb33d39 commit 0ef7ac5
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/Ravada/VM.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1461,7 +1461,7 @@ sub remove($self) {
Run a command on the node
my @ls = $self->run_command("ls");
my ($out,$err) = $self->run_command_cache("ls");
=cut

Expand Down Expand Up @@ -1492,6 +1492,15 @@ sub run_command($self, @command) {
return ($out, $err);
}

=head2 run_command_cache
Run a command on the node
my ($out,$err) = $self->run_command_cache("ls");
=cut


sub run_command_cache($self, @command) {
my $key = join(" ",@command);
return @{$self->{_run}->{$key}} if exists $self->{_run}->{$key};
Expand Down

0 comments on commit 0ef7ac5

Please sign in to comment.