Removed debugging messages.

This commit is contained in:
Martin Edenhofer 2012-04-18 15:13:09 +02:00
parent 20f2cdfecf
commit e1505a914a

View file

@ -8,24 +8,17 @@ class ApplicationModel < ActiveRecord::Base
if o.respond_to?('cache_delete') then o.cache_delete end if o.respond_to?('cache_delete') then o.cache_delete end
end end
def cache_delete def cache_delete
# puts 'cache_delete', self.inspect # puts 'cache_delete', self.id
puts 'cache_delete', self.id
key = self.class.to_s + '::' + self.id.to_s key = self.class.to_s + '::' + self.id.to_s
puts key
Rails.cache.delete( key.to_s ) Rails.cache.delete( key.to_s )
end end
def self.cache_set(data_id, data) def self.cache_set(data_id, data)
# puts 'cache_set', self.inspect # puts 'cache_set', data_id
# puts 'cache_set', self.to_s
puts 'cache_set', data_id
key = self.to_s + '::' + data_id.to_s key = self.to_s + '::' + data_id.to_s
puts key
Rails.cache.write( key.to_s, data) Rails.cache.write( key.to_s, data)
# @@cache[self.to_s][data_id] = data
end end
def self.cache_get(data_id) def self.cache_get(data_id)
puts 'cache_get', data_id # puts 'cache_get', data_id
# puts 'cache_get', self.inspect
key = self.to_s + '::' + data_id.to_s key = self.to_s + '::' + data_id.to_s
Rails.cache.read( key.to_s ) Rails.cache.read( key.to_s )
end end