Class: Noodall::GlobalUpdateTime::Stamp

Inherits:
Object
  • Object
show all
Defined in:
lib/noodall/global_update_time.rb

Class Method Summary collapse

Class Method Details

.readObject



6
7
8
# File 'lib/noodall/global_update_time.rb', line 6

def self.read
  Rails.cache.read('global_update_time') if defined?(Rails)
end

.update!Object



10
11
12
# File 'lib/noodall/global_update_time.rb', line 10

def self.update!
  Rails.cache.write('global_update_time', Time.zone.now.utc) if defined?(Rails)
end