anchor.diff:                  %% then the cache time we flush the cache and start a new cache
                   %% with a new package
                   [{BM, Start, Size, _End, Array}]
  -                  when (Time + Len) >= _End, Len < CT ->
  +                  when (Time + Len) >= _End, Len < CacheSize ->
                       Bin = k6_bytea:get(Array, 0, Size * ?DATA_SIZE),
                       k6_bytea:set(Array, 0, Value),
                       k6_bytea:set(Array, Len * ?DATA_SIZE,
  -                                 <<0:(?DATA_SIZE * 8 * (CT - Len))>>),
  +                                 <<0:(?DATA_SIZE * 8 * (CacheSize - Len))>>),
                       ets:update_element(T, BM, [{2, Time}, {3, Len},
  -                                               {4, Time + CT}]),
  +                                               {4, Time + CacheSize}]),
                       metric_io:write(IO, Bucket, Metric, Start, Bin);
                   %% In the case the data is already longer then the cache we
                   %% flush the cache
  
positive.code:     end.
  
  update_env(State) ->
      CT = application:get_env(metric_vnode, cache_points, 120),
      State#state{ct = CT}.
  
  
  %% Handling a get request overload
  
negative.code:              ]).
  
  -record(state, {
            %% The partition (i.e. vnode)
            partition :: pos_integer(),
            %% The node itself
            node :: node(),
            %% The table id
            tbl,
            %% the number of chace points
            cache_size = 1 :: pos_integer(),
            %% PID of the io node
            io :: metric_io:io_handle(),
            %% the current time
            now :: pos_integer() ,
            %% Resolution cache
            resolutions = btrie:new(),
            %% TTL cache
            lifetimes  = btrie:new()
           }).
  
  