anchor.diff:  %% Clears memory caches.
   %% @end
   %%--------------------------------------------------------------------
  --spec free_memory(NodeMem :: float()) -> ok | mem_usage_too_high | cannot_check_mem_usage | {error, term()}.
  +-spec free_memory(NodeMem :: float() | undefined) -> ok | mem_usage_too_high | cannot_check_mem_usage | {error, term()}.
  +free_memory(undefined) ->
  +    try
  +        % Following code will be used when clearing memory algorithm will change
  +        % TODO VFS-2428 - do not use foreach during clearing
  +        ok
  +%%        ok = plugins:apply(node_manager_plugin, clear_memory, [false]),
  +%%        ClearingOrder = [{false, globally_cached}, {false, locally_cached}],
  +%%        lists:foreach(fun
  +%%            ({Aggressive, StoreType}) ->
  +%%                caches_controller:clear_cache(Aggressive, StoreType)
  +%%        end, ClearingOrder)
  +    catch
  +        E1:E2 ->
  +            ?error_stacktrace("Error during caches cleaning ~p:~p", [E1, E2]),
  +            {error, E2}
  +    end;
   free_memory(NodeMem) ->
       try
           ok = plugins:apply(node_manager_plugin, clear_memory, [true]),
  
positive.code:             {ok, CleaningPeriod} = application:get_env(?CLUSTER_WORKER_APP_NAME, clear_cache_max_period_ms),
              case timer:now_diff(Now, Last) >= 1000000 * CleaningPeriod of
                  true ->
                      start_memory_cleaning(LastCleaningPid, MemUsage, State);
                  _ ->
                      State
              end
  
negative.code:             {error, E2}
      end.
  
  %%--------------------------------------------------------------------
  %% @private
  %% @doc
  