2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00
This reverts commit e62a85cf6f, reversing
changes made to 2660c2e21d.
This commit is contained in:
Jeff Atwood 2020-05-22 20:25:56 -07:00
parent e62a85cf6f
commit 20780a1eee
236 changed files with 717 additions and 1033 deletions

View file

@ -16,16 +16,15 @@ class ApplicationRequest < ActiveRecord::Base
include CachedCounting
def self.disable
@disabled = true
@enabled = false
end
def self.enable
@disabled = false
@enabled = true
end
def self.increment!(type, opts = nil)
return if @disabled
perform_increment!(redis_key(type), opts)
perform_increment!(redis_key(type), opts) if @enabled
end
def self.write_cache!(date = nil)