fix bug with incorrect method call for dalli client

This commit is contained in:
r888888888
2013-08-06 15:46:47 -07:00
parent 21cda60eca
commit 84cd566caf
3 changed files with 3 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
module ApiLimiter
def throttled?(ip_addr)
key = "#{ip_addr}:#{Time.now.hour}"
MEMCACHE.fetch(key, 1.hour, true) {0}
MEMCACHE.fetch(key, 1.hour, :raw => true) {0}
MEMCACHE.incr(key).to_i > CurrentUser.user.api_hourly_limit
end