anchor.diff:  %%%===================================================================
   do_get_permissions(State = #state{cache = Cache}) ->
     {reply, {ok, ets:tab2list(Cache)}, State}.
  +
  +do_get_permission(State = #state{cache = Cache}, SearchUserId, SearchDeviceId) ->
  +  Match = ets:fun2ms(fun(Permission = #permission{userId = UserId, deviceId = DeviceId}) when (UserId =:= SearchUserId) and (DeviceId =:= SearchDeviceId) -> Permission end),
  +  case ets:select(Cache, Match) of
  +    [] ->
  +      {reply, {error, <<"Not find permission">>}, State};
  +    [Item|_] ->
  +      {reply, {ok, Item}, State}
  +  end.
   
   do_get_permissions_by_user_id(State = #state{cache = Cache}, SearchUserId) ->
     Match = ets:fun2ms(fun(Permission = #permission{userId = UserId}) when UserId =:= SearchUserId -> Permission end),
  
positive.code: 
  -export([
    get/0,
    get_by_user_id/1,
    create/1,
    delete/1
  
negative.code: -spec(get() -> {ok, [Rec :: #permission{}]} | {error, string()}).
  get() ->
    gen_server:call(?SERVER, {get}).
  
  -spec(get(UserId :: integer(), DeviceId :: integer()) -> {ok, [Rec :: #permission{}]} | {error, string()}).
  get(UserId, DeviceId) ->
    gen_server:call(?SERVER, {get, UserId, DeviceId}).
  
  -spec(get_by_user_id(Id :: integer()) -> {ok, [Rec :: #permission{}]} | {error, string()}).
  get_by_user_id(Id) ->
  