Module: ArResqueCounterCache

Defined in:
lib/ar-resque-counter-cache/version.rb,
lib/ar-resque-counter-cache/active_record.rb,
lib/ar-resque-counter-cache/increment_counters_worker.rb

Defined Under Namespace

Modules: ActiveRecord Classes: IncrementCountersWorker

Constant Summary collapse

VERSION =
'3.1.0'

Class Method Summary collapse

Class Method Details

.redis=(redis) ⇒ Object

If you don’t want to use Resque’s Redis connection to store the temporary counter caches, you can set a different connection here.



15
16
17
18
19
# File 'lib/ar-resque-counter-cache/increment_counters_worker.rb', line 15

def self.redis=(redis)
  IncrementCountersWorker.class_eval do
    @redis = redis
  end
end

.resque_job_queue=(queue) ⇒ Object

The default Resque queue is :counter_caches.



7
8
9
10
11
# File 'lib/ar-resque-counter-cache/increment_counters_worker.rb', line 7

def self.resque_job_queue=(queue)
  IncrementCountersWorker.class_eval do
    @queue = queue
  end
end