Build Status

NAME

memcached-cli - Interactive/Batch CLI for Memcached

SYNOPSIS

Run an interactive CLI:

memcached-cli <HOST[:PORT] | /path/to/socket> [OPTIONS]
memcached-cli --addr|-a <HOST[:PORT] | /path/to/socket> [OPTIONS]
memcached-cli [OPTIONS]  # Connect to 127.0.0.1:11211

These above turns into interactive mode like below:

memcached@SERVER:PORT>
memcached@SERVER:PORT> set foo Foo
OK
memcached@SERVER:PORT> add bar Bar 300
OK
memcached@SERVER:PORT> gets foo bar
Key:foo Value:Foo       Length:3B       Flags:0 Cas:219
Key:bar Value:Bar       Length:3B       Flags:0 Cas:220
memcached@SERVER:PORT> \cd 1  # Alias of 'cachedump'
Key:foo Value:Foo       Length:3B       Expire:2016-03-26 00:30:27      Flags:0 Cas:219
Key:bar Value:Bar       Length:3B       Expire:2016-03-26 09:53:19      Flags:0 Cas:220
Key:baz Value:Baz       Length:3B       Expire:2016-03-26 10:49:05      Flags:123       Cas:221
memcached@SERVER:PORT> delete foo
OK
memcached@SERVER:PORT> flush_all
OK
memcached@SERVER:PORT> \q     # Quit interactive mode

Run as batch script:

memcached-cli [options] <command> [<args>]

Show Help/Manual:

# For general usage
memcached-cli -h|--help
memcached-cli --man

# For available commands
memcached@SERVER:PORT> help
memcached@SERVER:PORT> help <command>

DESCRIPTION

This script runs an interactive CLI or batch utility for Memcached.

In interactive mode, it connects to a specified Memcached server and interactively executes each command you run.

In batch mode, you can execute any command which you can do in interactive mode.

COMMANDS

NOTE:

A couple of features of following commands derives from memcached/memcached-tool

OPTIONS

SEE ALSO

App::Memcached::CLI::Main, memcached(1), http://www.memcached.org/

AUTHORS

IKEDA Kiyoshi progrhyme@gmail.com

LICENSE

Copyright (C) 2015-2017 IKEDA Kiyoshi.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. That means either (a) the GNU General Public License or (b) the Artistic License.