anchor.diff:  %%%===================================================================
   %%% Internal functions
   %%%===================================================================
  +do_get_permissions_by_user_id(State = #state{cache = Cache}, SearchUserId) ->
  +  Match = ets:fun2ms(fun(Permission = #permission{userId = UserId}) when UserId =:= SearchUserId -> Permission end),
  +  {reply, {ok, ets:select(Cache, Match)}, State}.
  +
  +do_create_permission(State = #state{cache = Cache}, PermissionModel) ->
  +  case em_storage:create_permission(PermissionModel) of
  +    {ok, Permission} ->
  +      case ets:insert_new(Cache, Permission) of
  +        true ->
  +          {reply, {ok, Permission}, State};
  +        false ->
  +          {reply, {error, <<"Error sync in permissions cache">>}, State}
  +      end;
  +    Reason ->
  +      {reply, Reason, State}
  +  end.
  +
  +do_delete_permission(State = #state{cache = Cache}, PermissionModel) ->
  +  case em_storage:delete_permission(PermissionModel) of
  +    {ok, Permission} ->
  +      case ets:delete(Cache, Permission#permission.id) of
  +        true ->
  +          {reply, {ok, Permission}, State};
  +        false -> {reply, {error, <<"Error sync in permissions cache">>}, State}
  +      end;
  +    Reason ->
  +      {reply, Reason, State}
  +  end.
positive.code:   {noreply, NewState :: #state{}, timeout() | hibernate} |
    {stop, Reason :: term(), Reply :: term(), NewState :: #state{}} |
    {stop, Reason :: term(), NewState :: #state{}}).
  handle_call(_Request, _From, State) ->
    {reply, ok, State}.
  
  
negative.code: 
  %% API
  -export([start_link/0]).
  
  -export([
    get_by_user_id/1,
    create/1,
    delete/1
  ]).
  
  %% gen_server callbacks
  -export([init/1,
  