Hatena::Grouperlang

Erlang Mind

 | 

2008-05-20

ememcached をパクリまくり。

| 22:40

process_delete(Socket, Key) ->
  mnesia:transaction(fun() ->
    case mnesia:read({cache, Key}) of
      [_] ->
        mnesia:delete({cache, Key}),
        gen_tcp:send(Socket, "DELETED\r\n");
      _ ->
        gen_tcp:send(Socket, "NOT_FOUND\r\n")
      end
  end).

これでいいのかなぁ ... mnesia は難しい ... 。

JoseJose2012/02/08 07:31Slam dunkin like Shaquille O'Neal, if he wrote informative artiecls.

MariaMaria2012/02/10 15:51You've hit the ball out the park! Inceridble!

SyrilSyril2012/02/10 15:51What a pleasure to find someone who thinks through the isuses

trsypuwywytrsypuwywy2012/02/10 21:32KVKeye <a href="http://svofsepusalc.com/">svofsepusalc</a>

ycsmrpoycsmrpo2012/02/14 01:26tIixFl , [url=http://bpvmcvweiijn.com/]bpvmcvweiijn[/url], [link=http://ikochteopvbj.com/]ikochteopvbj[/link], http://bpeprsduftyc.com/

 |