anchor.diff:  -author('Carlos Gonzalez <carlosj.gf@gmail.com>').
   -behaviour(gen_server).
   
  --export([get/2, get/3, put/3, del/2, increment/3, update/3]).
  --export([get_domain/3, get_domain/4, put_domain/4, del_domain/3, increment_domain/4, update_domain/4]).
  +-export([get/2, get/3, put/3, del/2, increment/3, update/3, add/3]).
  +-export([get_domain/3, get_domain/4, put_domain/4, del_domain/3,
  +         increment_domain/4, update_domain/4, add_domain/4]).
   -export([load_env/2, load_env/3, get_env/1]).
   -export([make_cache/5]).
   -export([parse_config/2, parse_config/3]).
  
positive.code:     increment_domain(Mod, none, Key, Count).
  
  
  %% @doc Sets a config value.
  -spec update(term(), term(), fun((term()) -> term())) ->
      ok.
  
  update(Mod, Key, Fun) ->
      update_domain(Mod, none, Key, Fun).
  
  
  
  %% @private
  
negative.code:             {reply, ok, State}
      end;
  
  handle_call({add, Mod, Domain, Key, Val}, _From, State) ->
      Reply = case get_domain(Mod, Domain, Key) of
          undefined ->
              put_domain(Mod, Domain, Key, [Val]),
              ok;
          List when is_list(List) ->
              case lists:member(Val, List) of
                  true ->
                      ok;
                  false ->
                      put_domain(Mod, Domain, Key, [Val|List])
              end;
          _ ->
              {error, invalid_value}
      end,
      {reply, Reply, State};
  
  handle_call(Msg, _From, State) ->
      lager:error("Module ~p received unexpected call ~p", [?MODULE, Msg]),
      {noreply, State}.
  