zammad_file_store.rb 664 B

12345678910111213141516171819
  1. # Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. module ActiveSupport
  3. module Cache
  4. class ZammadFileStore < FileStore
  5. def write(name, value, options = {})
  6. # in certain cases, caches are deleted by other thread at same
  7. # time, just log it
  8. super
  9. rescue Errno::ENOENT => e
  10. Rails.logger.debug { "Can't write cache (probably related to high load / https://github.com/zammad/zammad/issues/3685) #{name}: #{e.inspect}" }
  11. Rails.logger.debug e
  12. rescue => e
  13. Rails.logger.error "Can't write cache #{name}: #{e.inspect}"
  14. Rails.logger.error e
  15. end
  16. end
  17. end
  18. end