trabajo-afectivo/lib/cache.rb

14 lines
324 B
Ruby
Raw Normal View History

2012-07-29 15:27:01 +00:00
module Cache
def self.delete( key )
puts 'Cache.delete' + key.to_s
Rails.cache.delete( key.to_s )
end
def self.write( key, data )
puts 'Cache.write: ' + key.to_s
Rails.cache.write( key.to_s, data )
end
def self.get( key )
puts 'Cache.get: ' + key.to_s
Rails.cache.read( key.to_s )
end
end