anchor.diff:      ok | ?ERROR_INTERNAL_SERVER_ERROR.
   add_hook_for_missing_doc(Guid, CollectionType, CollectionUpdate) ->
       Uuid = file_id:guid_to_uuid(Guid),
  -    file_meta_posthooks:add_hook(Uuid, generator:gen_name(), 
  +    file_meta_posthooks:add_hook(Uuid, generator:gen_name(),
           ?MODULE, update_stats_of_parent, [Guid, CollectionType, CollectionUpdate, return_error]).
   
   
  
positive.code:     end.
  
  
  -spec flush_stats(file_id:file_guid(), dir_stats_collection:type()) -> ok | ?ERROR_INTERNAL_SERVER_ERROR .
  flush_stats(Guid, CollectionType) ->
      case dir_stats_collector_config:is_enabled_for_space(file_id:guid_to_space_id(Guid)) of
          true -> request_flush(Guid, CollectionType, prune_inactive);
  
negative.code:     collection_type = CollectionType,
      stat_names = StatNames
  }, State) ->
      {#cached_dir_stats{current_stats = CurrentStats}, UpdatedState} = reset_last_used_timer(Guid, CollectionType, State),
      {{ok, dir_stats_collection:with(StatNames, CurrentStats)}, UpdatedState};
  
  handle_call(#dsc_flush_request{guid = Guid, collection_type = CollectionType, pruning_strategy = PruningStrategy}, State) ->
      case flush_cached_dir_stats(gen_cached_dir_stats_key(Guid, CollectionType), PruningStrategy, State) of
          {true, UpdatedState} -> {ok, UpdatedState};
          {false, UpdatedState} -> {?ERROR_INTERNAL_SERVER_ERROR, UpdatedState}
      end;
  