anchor.diff:  
   
   %% @private
  --spec reset_last_used_timer(state(), file_id:file_guid(), dir_stats_collection:type()) ->
  +-spec reset_last_used_timer(file_id:file_guid(), dir_stats_collection:type(), state()) ->
       {cached_dir_stats(), state()} | no_return().
  -reset_last_used_timer(State, Guid, CollectionType) ->
  -    update_in_cache(State, Guid, CollectionType, fun(CachedDirStats) -> CachedDirStats end).
  -
  -
  -%% @private
  --spec update_in_cache(state(), file_id:file_guid(), dir_stats_collection:type(), 
  -    fun((cached_dir_stats()) -> cached_dir_stats())) ->
  +reset_last_used_timer(Guid, CollectionType, State) ->
  +    update_in_cache(Guid, CollectionType, fun(CachedDirStats) -> CachedDirStats end, State).
  +
  +
  +%% @private
  +-spec update_in_cache(file_id:file_guid(), dir_stats_collection:type(),
  +    fun((cached_dir_stats()) -> cached_dir_stats()), state()) ->
       {UpdatedCachedDirStats :: cached_dir_stats(), state()} | no_return().
  -update_in_cache(#state{dir_stats_cache = DirStatsCache} = State, Guid, CollectionType, Diff) ->
  +update_in_cache(Guid, CollectionType, Diff, #state{dir_stats_cache = DirStatsCache} = State) ->
       CachedDirStatsKey = gen_cached_dir_stats_key(Guid, CollectionType),
       CachedDirStats = case maps:find(CachedDirStatsKey, DirStatsCache) of
           {ok, DirStatsFromCache} ->
  
positive.code:     collection_type = CollectionType,
      stat_names = StatNames
  }, State) ->
      {#cached_dir_stats{current_stats = CurrentStats}, UpdatedState} = reset_last_used_timer(State, Guid, CollectionType),
      {{ok, dir_stats_collection:with(StatNames, CurrentStats)}, UpdatedState};
  
  handle_call(#dsc_flush_request{guid = Guid, collection_type = CollectionType, pruning_strategy = PruningStrategy}, State) ->
      case flush_and_prune_keys([gen_cached_dir_stats_key(Guid, CollectionType)], PruningStrategy, State) of
          {true, UpdatedState} -> {ok, UpdatedState};
          {false, UpdatedState} -> {?ERROR_INTERNAL_SERVER_ERROR, UpdatedState}
      end;
  
negative.code: 
  %% @private
  -spec request_flush(file_id:file_guid(), dir_stats_collection:type(), PruningStrategy :: pruning_strategy()) ->
      ok | ?ERROR_INTERNAL_SERVER_ERROR.
  request_flush(Guid, CollectionType, PruningStrategy) ->
      Request = #dsc_flush_request{
          guid = Guid,
  