Improved error handling on many concurrent cache file writes/deletes. Do not raise exemption if write was not successfully.
This commit is contained in:
parent
450984719c
commit
ba75b4a0de
|
@ -8,7 +8,11 @@ module Cache
|
||||||
params[:expires_in] = 24.hours
|
params[:expires_in] = 24.hours
|
||||||
end
|
end
|
||||||
# puts 'Cache.write: ' + key.to_s
|
# puts 'Cache.write: ' + key.to_s
|
||||||
|
begin
|
||||||
Rails.cache.write( key.to_s, data, params)
|
Rails.cache.write( key.to_s, data, params)
|
||||||
|
rescue Exception => e
|
||||||
|
puts "NOTICE: #{e.message}"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
def self.get( key )
|
def self.get( key )
|
||||||
# puts 'Cache.get: ' + key.to_s
|
# puts 'Cache.get: ' + key.to_s
|
||||||
|
|
Loading…
Reference in a new issue