Module: RailsFastCache::AsyncWrites

Defined in:
lib/rails-fast-cache/async_writes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#rails_fast_cache_loggerObject

Returns the value of attribute rails_fast_cache_logger.



5
6
7
# File 'lib/rails-fast-cache/async_writes.rb', line 5

def rails_fast_cache_logger
  @rails_fast_cache_logger
end

#rails_fast_cache_schedulerObject

Returns the value of attribute rails_fast_cache_scheduler.



5
6
7
# File 'lib/rails-fast-cache/async_writes.rb', line 5

def rails_fast_cache_scheduler
  @rails_fast_cache_scheduler
end

Instance Method Details

#write(name, value, options = nil) ⇒ Object



7
8
9
10
# File 'lib/rails-fast-cache/async_writes.rb', line 7

def write(name, value, options = nil)
  rails_fast_cache_scheduler.post { perform_async_write { super(name, value, options) } }
  true
end

#write_multi(hash, options = nil) ⇒ Object



12
13
14
15
# File 'lib/rails-fast-cache/async_writes.rb', line 12

def write_multi(hash, options = nil)
  rails_fast_cache_scheduler.post { perform_async_write { super(hash, options) } }
  true
end