anchor.diff:      ets:insert(TimeRef, {Now, {Bucket, Key}}).
   
   %% @private
  +delete_time_entry(TimeRef, Timestamp) ->
  +    case TimeRef of
  +      undefined -> ok;
  +      _ -> ets:delete(TimeRef, Timestamp)
  +    end.
  +
  +%% @private
   %% @doc Dump some entries if the max memory size has
   %% been breached.
   trim_data_table(MaxMemory, UsedMemory, _, _, _, Freed) when
  
positive.code:                 0;
              [{_BKey, {{ts, OldTimestamp}, _OldVal}}=OldObject] ->
                  %% prevents leak in the TimeRef table on update
                  case TimeRef of
                      undefined -> ok;
                      _ -> ets:delete(TimeRef, OldTimestamp)
                  end,
                  object_size(OldObject)
          end,
      {ok, Size} = do_put(Bucket, PrimaryKey, Val1, IndexSpecs, DataRef, IndexRef),
  
negative.code:                     ets:delete(DataRef, {Bucket, Key}),
                      ets:match_delete(IndexRef, ?DELETE_PTN(Bucket, Key)),
                      %% prevents leak in the TimeRef table on expire
                      delete_time_entry(TimeRef, Timestamp),
                      case MaxMemory of
                          undefined ->
                              UsedMemory1 = UsedMemory;
  