How can I make Webmachine and eredis work together?
I've been meditating on the question of Redis usage in my Webmachine application for a week. And I haven't enlightened yet. I'm going to use Eredis and here is an example of usage: {ok, Con} = eredis:start_link(). {ok, <<"OK">>} = eredis:q(Con, ["SET", "foo", "bar"]). {ok, <<"bar">>} = eredis:q(Con, ["GET", "foo"]). As I understand eredis:start_link() should be called somewhere only once. But then how can I get Con variable in my resources? There are several solutions: register a redis connection locally or globally use a process register like gproc keep the pid of the connection in the