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

NAME

Cache::MemcachedBinary - Perl extension for Memcached server with binary protocol.

SYNOPSIS

    use Modern::Perl;
    use Cache::MemcachedBinary;

    my $logger = sub {say @_};
    my $obj_mem = Cache::MemcachedBinary->new(
        host     => '127.0.0.1',
        port     => 11211,
        timeout  => 2,
        login    => 'login',
        password => 'password',
        debug    => 1,
        logger   => $logger, # default print to STDERR
    );

    my $key = 'memcached_key';

    # get value
    my $value = $obj_mem->get($key);

    # add/set
    $obj_mem->add($key, 'my value' [, $exptime]);
    $obj_mem->set($key, 'my value' [, $exptime]);

    # delete
    $obj_mem->delete($key);

    # increment
    my $incr = $obj_mem->incr($key);

    # flush all memcached data
    $obj_mem->flush();

DESCRIPTION

This module is simple interface for Memcached server with binary protocol.

EXPORT

None.

AUTHOR

Konstantin Titov, <xmolex@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2024 by Konstantin Titov

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