module Card::Cache::SharedClass
class methods for Card::Cache::Shared
Public Instance Methods
Source
# File lib/card/cache/shared_class.rb, line 10 def new_stamp Time.now.to_i.to_s(36) + rand(999).to_s(36) end
stamp generator
Source
# File lib/card/cache/shared_class.rb, line 22 def reset @stamp = new_stamp Cardio.cache.write stamp_key, @stamp end
Source
# File lib/card/cache/shared_class.rb, line 5 def stamp @stamp ||= Cardio.cache.fetch(stamp_key) { new_stamp } end
Source
# File lib/card/cache/shared_class.rb, line 14 def stamp_key "#{Cardio.database}-stamp" end