Permalink
Browse files

ugly floats

  • Loading branch information...
1 parent b18fe81 commit 2c80e891c5ecbeebada5b20d316a724ecec8170d Nick Kallen committed Apr 17, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 util/in_process_lru_cache.rb
View
4 util/in_process_lru_cache.rb
@@ -5,14 +5,14 @@ def get(data)
data == key
end
if !cache_hit
- $stats.set('cache_hit', 0.0)
+ $stats.set('cache_hit', 0)
result = yield(data)
@cache.unshift([data, result])
@cache.slice!(2..-1)
result
else
- $stats.set('cache_hit', 1.0)
+ $stats.set('cache_hit', 1)
cache_hit[1]
end

0 comments on commit 2c80e89

Please sign in to comment.