Skip to content

Commit

Permalink
adjusted readme
Browse files Browse the repository at this point in the history
  • Loading branch information
joewilliams committed Jan 15, 2009
1 parent d655c40 commit d75570b
Showing 1 changed file with 51 additions and 14 deletions.
65 changes: 51 additions & 14 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,34 @@ Info : http://github.com/joewilliams/merle/

This code is available as Open Source Software under the MIT license.

Features:
* Support for stats, version, get, delete, set, add, replace, append, prepend, cas
* Supports making calls to memcached directly as well as through gen_server

To Do:
* The noreply option and the append, prepend, increment and decrement commands will likely be added in the future
* Support for retrieving multiple keys at once
* Socket pool/reuse

Usage:

* Start it up *

2> merle:start_link("localhost", 11211).
{ok,<0.38.0>}

* Set and get some data*
* Set and get some data *

9> merle:set("b", "1", "0", [asdf,[{asdf, asdf}, asdf]]).
["STORED"]
10> merle:get("b").
10> merle:get("b").
[[asdf,[{asdf,asdf},asdf]]]

* Get the memcached version *

11> merle:version().
["VERSION 1.2.6"]


* Get memcached stats *

12> merle:stats().
Expand All @@ -40,37 +48,66 @@ Usage:
"STAT bytes_read 128911","STAT bytes_written 257735",
"STAT limit_maxbytes 67108864","STAT threads 1","END"]

* Get stats with arguments *

145> merle:stats("localhost", 11211, "slabs").
["STAT 1:chunk_size 104","STAT 1:chunks_per_page 10082",
"STAT 1:total_pages 1","STAT 1:total_chunks 10082",
"STAT 1:used_chunks 10081","STAT 1:free_chunks 1",
"STAT 1:free_chunks_end 10080","STAT 21:chunk_size 10320",
"STAT 21:chunks_per_page 101","STAT 21:total_pages 1",
"STAT 21:total_chunks 101","STAT 21:used_chunks 101",
"STAT 21:free_chunks 0","STAT 21:free_chunks_end 100",
"STAT active_slabs 2","STAT total_malloced 2090848","END"]

* Direct memcached call example *

13> merle:set("localhost", 11211, "a", "1", "0", asdf).
["STORED"]
14> merle:get("localhost", 11211, "a").
[asdf]



API:

start_link(Host, Port)

stats()

stats(Host, Port)

stats(Args)

stats(Host, Port, Args)

version()

version(Host, Port)

get(Key)

delete(Key, Time)
get(Host, Port, Key)

set(Key, Flag, ExpTime, Data)
delete(Key, Time)

add(Key, Flag, ExpTime, Data)
delete(Host, Port, Key, Time)

replace(Key, Flag, ExpTime, Data)
set(Key, Flag, ExpTime, Data)

append(Key, Data)
set(Host, Port, Key, Flag, ExpTime, Data)

prepend(Key, Data)
add(Key, Flag, ExpTime, Data)

quit()
add(Host, Port, Key, Flag, ExpTime, Data)

stats_args() *untested*
replace(Key, Flag, ExpTime, Data)

cas(Key, Flag, ExpTime, CasUniq, Data) *untested
replace(Host, Port, Key, Flag, ExpTime, Data)

increment(Key, Data) *untested
cas(Key, Flag, ExpTime, CasUniq, Data)

decrement(Key, Data) *untested
cas(Host, Port, Key, Flag, ExpTime, CasUniq, Data)

quit()

0 comments on commit d75570b

Please sign in to comment.