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)
|
||||
Rails.cache.delete(key.to_s)
|
||||
rescue => e
|
||||
Rails.logger.error "ERROR: Cache.delete #{e.message}"
|
||||
end
|
||||
|
||||
=begin
|
||||
|
@ -31,7 +33,7 @@ write a cache
|
|||
begin
|
||||
Rails.cache.write(key.to_s, data, params)
|
||||
rescue => e
|
||||
Rails.logger.error "NOTICE: #{e.message}"
|
||||
Rails.logger.error "ERROR: Cache.write #{e.message}"
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue