Skip to content

Commit

Permalink
Is there a reason for doing this 5000 times? For me the marshalled ha…
Browse files Browse the repository at this point in the history
…sh grows to greater than 1MB and the server chokes.
  • Loading branch information
stopdropandrew committed Sep 23, 2008
1 parent b34873b commit 66be257
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/interlock/interlock.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ def register_dependencies(dependencies, key)

# Make sure to not overwrite broader scopes.
unless this == :all or this == scope
# We need to write, so acquire the lock.
# We need to write, so acquire the lock.
CACHE.lock(dep_key) do |hash|
Interlock.say key, "registered a dependency on #{klass} -> #{scope.inspect}."
(hash || {}).merge({key => scope})
end
end
end
end
end

Expand Down
2 changes: 1 addition & 1 deletion test/unit/interlock_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def test_caching_key_strips_whitespace
def test_register_dependencies_with_many_keys_one_dependency

assert_nothing_raised do
(1..5000).each do |i|
(1..3).each do |i|
Interlock.register_dependencies({Item=>:id}, Interlock.caching_key("a"*200, "show", i, nil))
end
end
Expand Down

0 comments on commit 66be257

Please sign in to comment.