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::LeaderBoardMulti - Redis leader board considering multiple scores


    use Redis;
    use Redis::LeaderBoard;
    my $redis = Redis->new;
    my $lb = Redis::LeaderBoardMulti->new(
        redis => $redis,
        key   => 'leader_board:1',
        order => ['asc', 'desc'], # asc/desc, desc as default
    $lb->set_score('one' => 100, time);
    $lb->set_score('two' =>  50, time);
    my ($rank, $score) = $lb->get_rank_with_score('one');


Redis::LeaderBoardMulti is for providing leader board by using Redis's sorted set. Redis::LeaderBoard considers only one score, while Redis::LeaderBoardMulti can consider secondary score.


Copyright (C) Ichinose Shogo.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


Ichinose Shogo <>