I just pushed out some new code to
github for merle. It should have some nice new treats in it for you including a new recieve loop for large objects. Just to make sure it worked properly I ran md5's on the input and output, example below. In the last few days I have also added a few new calls such as
version/0 which gets the memcached version for you. Check out the readme for examples and entire API. Things are getting close to the first full release so stay tuned.
2> merle:start_link("localhost", 11211).
{ok,<0.38.0>}
3> {ok, TestPDF} = file:read_file("test.pdf").
{ok,<<"%PDF-1.4\n11 0 obj\n<< /S /GoTo /D (Outline1) >>\nendobj\n14 0 obj\n(Introduction)\nendobj\n15 0 obj\n<< /S /GoTo /D"...>>}
4> merle:set("a", "1", "0", TestPDF).
["STORED"]
5> merle:get("a").
[<<"%PDF-1.4\n11 0 obj\n<< /S /GoTo /D (Outline1) >>\nendobj\n14 0 obj\n(Introduction)\nendobj\n15 0 obj\n<< /S /GoTo /D (Ou"...>>]
6> [TestPDF1] = merle:get("a").
[<<"%PDF-1.4\n11 0 obj\n<< /S /GoTo /D (Outline1) >>\nendobj\n14 0 obj\n(Introduction)\nendobj\n15 0 obj\n<< /S /GoTo /D (Ou"...>>]
7> erlang:md5(TestPDF).
<<120,165,244,215,18,94,214,215,236,65,148,80,135,39,68,
125>>
8> erlang:md5(TestPDF1).
<<120,165,244,215,18,94,214,215,236,65,148,80,135,39,68,
125>>