anchor.diff:      Exp = (Now - LT) div Res,
       {Exp, State}.
   
  -get_bucket_info(Bucket, State = #state{bucket_info = BktInfo}) ->
  -    case btrie:find(Bucket, BktInfo) of
  -        {ok, Info} ->
  -            {Info, State};
  -        error ->
  +get_bucket_info(Bucket, State) ->
  +    case get(Bucket) of
  +        undefined ->
               metric_io:inform(State#state.io, Bucket),
               {ok, Info} = dalmatiner_bucket:info(Bucket),
               Info1 = case Info of
  
positive.code:           %% PID of the io node
            io :: metric_io:io_handle(),
            %% the current time
            now :: pos_integer() ,
            %% Resolution cache
            bucket_info = btrie:new()
           }).
  
  -define(MASTER, metric_vnode_master).
  
negative.code:                         #{resolution := Res, ttl := TTL} ->
                              Info#{ttl := TTL * Res}
                      end,
              put(Bucket, Info1),
              {Info1, State};
          Info ->
              {Info, State}
      end.
  
  %%get_bucket_info(Bucket, State = #state{bucket_info = BktInfo}) ->
  %% case btrie:find(Bucket, BktInfo) of
  %%     {ok, Info} ->
  %%         {Info, State};
  %%     error ->
  %%         metric_io:inform(State#state.io, Bucket),
  %%         {ok, Info} = dalmatiner_bucket:info(Bucket),
  %%         Info1 = case Info of
  %%                     #{ttl := infinity} ->
  %%                         Info;
  %%                     #{resolution := Res, ttl := TTL} ->
  %%                         Info#{ttl := TTL * Res}
  %%                 end,
  %%         BktInfo1 = btrie:store(Bucket, Info1, BktInfo),
  %%         {Info1, State#state{bucket_info = BktInfo1}}
  %% end.
  
  update_env(State) ->
      State.
  