anchor.diff:                   {ok, not_found, state()} |
                    {error, term(), state()}.
   get(Bucket, Key, State=#state{data_ref=DataRef,
  +                              index_ref=IndexRef,
  +                              used_memory=UsedMemory,
                                 ttl=TTL}) ->
       case ets:lookup(DataRef, {Bucket, Key}) of
           [] -> {error, not_found, State};
  -        [{{Bucket, Key}, {{ts, Timestamp}, Val}}] ->
  +        [{{Bucket, Key}, {{ts, Timestamp}, Val}}=Object] ->
               case exceeds_ttl(Timestamp, TTL) of
                   true ->
  -                    delete(Bucket, Key, undefined, State),
  -                    {error, not_found, State};
  +                    %% Because we do not have the IndexSpecs, we must
  +                    %% delete the object directly and all index
  +                    %% entries blindly using match_delete.
  +                    ets:delete(DataRef, {Bucket, Key}),
  +                    ets:match_delete(IndexRef, ?DELETE_PTN(Bucket, Key)),
  +                    {error, not_found, State#state{used_memory=UsedMemory - object_size(Object)}};
                   false ->
                       {ok, Val, State}
               end;
  
positive.code: %% <ul>
  %% <li>`ttl' - The time in seconds that an object should live before being expired.</li>
  %% <li>`max_memory' - The amount of memory in megabytes to limit the backend to.</li>
  %% </ul>
  %%
  
  
negative.code:         _ ->
              Val1 = {{ts, Now}, Val}
      end,
      {ok, Size} = do_put(Bucket, PrimaryKey, Val1, IndexSpecs, DataRef, IndexRef),
      case MaxMemory of
          undefined ->
              UsedMemory1 = UsedMemory;
          _ ->
              time_entry(Bucket, PrimaryKey, Now, TimeRef),
              Freed = trim_data_table(MaxMemory,
                                      UsedMemory + Size,
                                      DataRef,
                                      TimeRef,
                                      IndexRef,
                                      0),
              UsedMemory1 = UsedMemory + Size - Freed
      end,
      {ok, State#state{used_memory=UsedMemory1}}.
  
  %% @doc Delete an object from the memory backend
  -spec delete(riak_object:bucket(), riak_object:key(), [index_spec()], state()) ->
                      {ok, state()}.
  delete(Bucket, Key, IndexSpecs, State=#state{data_ref=DataRef,
  