Improved error handling.
This commit is contained in:
parent
7b8eea8fd9
commit
e5647be022
1 changed files with 3 additions and 1 deletions
|
@ -10,6 +10,8 @@ delete a cache
|
||||||
|
|
||||||
def self.delete(key)
|
def self.delete(key)
|
||||||
Rails.cache.delete(key.to_s)
|
Rails.cache.delete(key.to_s)
|
||||||
|
rescue => e
|
||||||
|
Rails.logger.error "ERROR: Cache.delete #{e.message}"
|
||||||
end
|
end
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
@ -31,7 +33,7 @@ write a cache
|
||||||
begin
|
begin
|
||||||
Rails.cache.write(key.to_s, data, params)
|
Rails.cache.write(key.to_s, data, params)
|
||||||
rescue => e
|
rescue => e
|
||||||
Rails.logger.error "NOTICE: #{e.message}"
|
Rails.logger.error "ERROR: Cache.write #{e.message}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue