anchor.diff:           provide_japi_content/2,
            provide_json_content/2]).
   
  --record(ctx, {method, start, rows, cluster, node, bucket_type, bucket, key, resource, id, response=undefined}).
  +-record(ctx, {method, start, rows, cluster, node, bucket_type, bucket, resource, id, response=undefined}).
   
   -include_lib("webmachine/include/webmachine.hrl").
   -include("riak_explorer.hrl").
  
positive.code: -define(noNode(),
      #ctx{node=[{error, no_nodes}]}).
  -define(putKeys(Node, BucketType, Bucket),
      #ctx{node=Node, method='PUT', bucket_type=BucketType, bucket=Bucket, key=undefined}).
  -define(cleanKeys(Node, BucketType, Bucket),
      #ctx{node=Node, method='DELETE', bucket_type=BucketType, bucket=Bucket, key=undefined}).
  -define(listKeysCache(Node, BucketType, Bucket),
      #ctx{node=Node, method='GET', bucket_type=BucketType, bucket=Bucket, key=undefined}).
  -define(listKeys(Node, BucketType, Bucket),
      #ctx{node=Node, method='POST', bucket_type=BucketType, bucket=Bucket, key=undefined}).
  -define(keyInfo(Node, BucketType, Bucket, Key),
      #ctx{node=Node, method='GET', bucket_type=BucketType, bucket=Bucket, key=Key, resource=undefined}).
  -define(keyResource(Node, BucketType, Bucket, Key, Resource),
      #ctx{node=Node, method='GET', bucket_type=BucketType, bucket=Bucket, key=Key, resource=Resource}).
  
  %%%===================================================================
  %%% API
  
negative.code:     JobsPath = string:substr(wrq:path(RD),1, string:str(wrq:path(RD), "refresh_keys") - 1) ++ "jobs",
      re_wm_util:set_jobs_response(RD, Ctx, JobsPath,
          re_riak:list_keys(Node, BucketType, Bucket));
  resource_exists(RD, Ctx) ->
      {false, RD, Ctx}.
  
  