anchor.diff:              % TODO: not quite sure of this additional `prepare` step
               %       we could do that in here as well...
               gen_server:cast(self(), {prepare, Metadata}),
  -            {ok, #state{path=Path}};
  +            {ok, #state{path=Path, inactivity=none}};
           false ->
               % there is a metric handler already for this path
               % let's shut down now
  
positive.code:         _Otherwise -> ok
      end,
  
      {noreply, NewState};
  
  handle_cast(_Msg, State) ->
      {noreply, State}.
  
negative.code:     {noreply, State#state{metadata=Metadata}};
  
  handle_info(flush_cache, State) ->
      State0 = flush(State),
      {noreply, State0};
  
  handle_info(inactivity, State) ->
      Path = State#state.path,
      lager:info("stopping metrics handler for ~p due to inactivity", [Path]),
      {stop, normal, State#state{inactivity=none}};
  
  handle_info(_Info, State) ->
      {noreply, State}.
  