<commit_before># Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/

module ActiveSupport
  module Cache
    class ZammadFileStore < FileStore
      def write(name, value, options = {})
        # in certain cases, caches are deleted by other thread at same
        # time, just log it
        super
      rescue => e
        Rails.logger.error "Can't write cache #{key}: #{e.inspect}"
        Rails.logger.error e
      end
    end
  end
end<commit_msg>Maintenance: Fix a crash in the error handler of Zammad's file cache.<commit_after># Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/

module ActiveSupport
  module Cache
    class ZammadFileStore < FileStore
      def write(name, value, options = {})
        # in certain cases, caches are deleted by other thread at same
        # time, just log it
        super
      rescue => e
        Rails.logger.error "Can't write cache #{name}: #{e.inspect}"
        Rails.logger.error e
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.08838133068520357, 'fraction_numerical': 0.015888778550148957, 'mean_word_length': 2.5618374558303887, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7549026', 'n_tokens_mistral': 310, 'n_tokens_neox': 291, 'n_words': 106}