Skip to content

Commit

Permalink
Keys now have the form speedtracer:<trace_id>
Browse files Browse the repository at this point in the history
  • Loading branch information
simonjefford committed Aug 9, 2010
1 parent 99f7f0a commit 3130e5a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/rack/speedtracer/redis_storage.rb
Expand Up @@ -22,7 +22,7 @@ def []=(trace_id, trace)
private

def namespace_key(key)
"speedtracer_#{key}"
"speedtracer:#{key}"
end
end
end
Expand Down
6 changes: 3 additions & 3 deletions spec/rack/speedtracer/redis_storage_spec.rb
Expand Up @@ -10,14 +10,14 @@

it "fetches traces from Redis" do
r = @storage_klass.new({})
@mock_redis.should_receive(:get).with("speedtracer_some_trace")
@mock_redis.should_receive(:get).with("speedtracer:some_trace")
trace = r['some_trace']
end

it "saves traces in Redis with a default expiry time" do
r = @storage_klass.new({})
@mock_redis.should_receive(:set).with("speedtracer_some_trace", "trace_contents")
@mock_redis.should_receive(:expire).with("speedtracer_some_trace", 600)
@mock_redis.should_receive(:set).with("speedtracer:some_trace", "trace_contents")
@mock_redis.should_receive(:expire).with("speedtracer:some_trace", 600)
r['some_trace'] = "trace_contents"
end
end

0 comments on commit 3130e5a

Please sign in to comment.