X-Git-Url: http://git.rot13.org/?p=perl-Redis.git;a=blobdiff_plain;f=lib%2FRedis.pm;h=7d2e692f3c09bdb960ac2693f585895afdd87aab;hp=36416c435e665d09b060d439937509fadcc9db38;hb=844f868acac56c2900a12cc0afae7164135d8a07;hpb=3957dcfecc1628ff65b686a2444765c4ebeef05b diff --git a/lib/Redis.pm b/lib/Redis.pm index 36416c4..7d2e692 100644 --- a/lib/Redis.pm +++ b/lib/Redis.pm @@ -536,6 +536,65 @@ sub flushall { $self->_sock_send_ok('flushall'); } +=head1 Sorting + +=head2 sort + + $r->sort("key BY pattern LIMIT start end GET pattern ASC|DESC ALPHA'); + +=cut + +sub sort { + my ( $self, $sort ) = @_; + $self->_sock_result_bulk_list( "SORT $sort" ); +} + +=head1 Persistence control commands + +=head2 save + + $r->save; + +=cut + +sub save { + my $self = shift; + $self->_sock_send_ok( 'SAVE' ); +} + +=head2 bgsave + + $r->bgsave; + +=cut + +sub bgsave { + my $self = shift; + $self->_sock_send_ok( 'BGSAVE' ); +} + +=head2 lastsave + + $r->lastsave; + +=cut + +sub lastsave { + my $self = shift; + $self->_sock_send( 'LASTSAVE' ); +} + +=head2 shutdown + + $r->shutdown; + +=cut + +sub shutdown { + my $self = shift; + $self->_sock_send( 'SHUTDOWN' ); +} + =head1 AUTHOR Dobrica Pavlinusic, C<< >>