anchor.diff:  -export([code_change/3, terminate/2]).
   
   -export([handle_config_change/5]).
  +-export([handle_db_event/3]).
   
   -include_lib("couch/include/couch_db.hrl").
   -include("couch_js_functions.hrl").
  
positive.code:     max_cache_size = 0,
      cache_size = 0,
      db_notifier = nil,
      db_mon_ref = nil
  }).
  
  
  
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),
  