The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

Redis is an advanced key-value store. It is similar to memcached but the dataset is not volatile, and values can be strings, exactly like in memcached, but also lists, sets, and ordered sets. All this data types can be manipulated with atomic operations to push/pop elements, add/remove elements, perform server side union, intersection, difference between sets, and so forth. Redis supports different kind of sorting abilities.

MojoX::Redis is asynchronous Redis client for Mojo.

Usage example

    use MojoX::Redis;

    my $redis = MojoX::Redis->new;

    $redis->set(test => "test_ok")
    ->get(test => sub {
        my ($redis, $result) = @_;

        die $redis->error unless defined $result;

        print qq|"result" = "|, $result->[0], qq|"\n|;
        $redis->ioloop->stop;
    })
    ->start;