anchor.diff:      {stop, Reason, State}.
   
   -spec handle_keys_done(state()) -> fsm_state_return().
  -handle_keys_done(State=#state{cache_key=CacheKey,
  -                              key_buffer=ListofListofKeys}) ->
  -    riak_cs_list_objects_ets_cache:write(CacheKey, ListofListofKeys),
  +handle_keys_done(State=#state{key_buffer=ListofListofKeys}) ->
  +    ok = maybe_write_to_cache(State, ListofListofKeys),
       NewState = prepare_state_for_first_mapred(ListofListofKeys, State),
       maybe_map_reduce(NewState).
   
  
positive.code: -spec start_link(pid(), list_object_request(), term()) ->
      {ok, pid()} | {error, term()}.
  start_link(RiakcPid, ListKeysRequest, CacheKey) ->
      gen_fsm:start_link(?MODULE, [RiakcPid, ListKeysRequest, CacheKey], []).
  
  -spec get_object_list(pid()) ->
      {ok, list_object_response()} |
  
negative.code: 
  %% List Keys stuff
  %%--------------------------------------------------------------------
  
  -spec maybe_fetch_key_list(pid(), list_object_request(), state()) ->
      fsm_state_return().
  maybe_fetch_key_list(RiakcPid, Request, State=#state{use_cache=true,
                                                       cache_key=CacheKey}) ->
      CacheResult = riak_cs_list_objects_ets_cache:lookup(CacheKey),
      fetch_key_list(RiakcPid, Request, State, CacheResult);
  maybe_fetch_key_list(RiakcPid, Request, State=#state{use_cache=false}) ->
      fetch_key_list(RiakcPid, Request, State, false).
  
  -spec maybe_write_to_cache(state(), list()) -> ok.
  maybe_write_to_cache(#state{use_cache=false}, _ListofListofKeys) ->
      ok;
  maybe_write_to_cache(#state{cache_key=CacheKey}, ListofListofKeys) ->
      riak_cs_list_objects_ets_cache:write(CacheKey, ListofListofKeys).
  
  %% @doc Either proceed using the cached key list or make the request
  %% to start a key listing.
  