anchor.diff:      true.
   
   
  -%% @doc Flush a key from the cache.
  +%% @doc Flush a key from the cache, reset the in-process cache as well (we don't know if any cached value had a dependency)
   flush_key(Key, State) ->
       ets:delete(State#state.data_table, Key),
       ets:delete(State#state.deps_table, Key),
  -    ets:delete(State#state.meta_table, Key).
  +    ets:delete(State#state.meta_table, Key),
  +    z_utils:erase_process_dict().
   
   
   %% @doc Check if all dependencies are still valid, that is they have a serial before or equal to the serial of the entry
  
positive.code: code_change(_OldVersion, State, _Extra) -> {ok, State}.
  
  
  incr(undefined) -> 1;
  incr(N) -> N+1.
  
  
negative.code: 
  %% @doc Fetch a key from the cache, returns undefined when not found.
  handle_call({get, Key}, _From, State) ->
      {reply, get_in_depcache(Key, State), State};
  
  %% @doc Fetch a subkey from a key from the cache, returns undefined when not found.
  %% This is useful when the cached data is very large and the fetched data is small in comparison.
  handle_call({get, Key, SubKey}, _From, State) ->
      case get_in_depcache(Key, State) of
          undefined -> {reply, undefined, State};
          {ok, Value} -> {reply, {ok, find_value(SubKey, Value)}, State}
      end;
  
  %% Add an entry to the cache table
  handle_call({set, Key, Data, MaxAge, Depend}, _From, State) ->
      z_utils:erase_process_dict(),
      State1 = State#state{serial=State#state.serial+1},
      case MaxAge of
          0 ->
  