anchor.diff:      {ok, reinit_cache(State)}.
   
   
  -handle_db_event({Event, DbName}) ->
  -    [{auth_db_name, AuthDbName}] = ets:lookup(?STATE, auth_db_name),
  -    case DbName =:= AuthDbName of
  -    true ->
  -        case Event of
  -        created -> gen_server:call(?MODULE, reinit_cache, infinity);
  -        compacted -> gen_server:call(?MODULE, auth_db_compacted, infinity);
  -        _Else   -> ok
  -        end;
  -    false ->
  -        ok
  -    end.
  +handle_db_event(_DbName, created, St) ->
  +    gen_server:call(?MODULE, reinit_cache, infinity),
  +    {ok, St};
  +handle_db_event(_DbName, compacted, St) ->
  +    gen_server:call(?MODULE, auth_db_compacted, infinity),
  +    {ok, St};
  +handle_db_event(_, _, St) ->
  +    {ok, St}.
   
   
   handle_call(reinit_cache, _From, State) ->
  
positive.code: -export([code_change/3, terminate/2]).
  
  -export([handle_config_change/5]).
  
  -include_lib("couch/include/couch_db.hrl").
  -include("couch_js_functions.hrl").
  
negative.code:     {noreply, reinit_cache(State)}.
  
  
  terminate(_Reason, #state{event_listener = Listener}) ->
      couch_event:stop_listener(Listener),
      exec_if_auth_db(fun(AuthDb) -> catch couch_db:close(AuthDb) end),
      true = ets:delete(?BY_USER),
      true = ets:delete(?BY_ATIME),
  