cache_clear_job.rb 340 B

123456789101112
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class CacheClearJob < ApplicationJob
  3. include HasActiveJobLock
  4. def perform
  5. # Memcached does not support clean-up, so only perform it for filesystem cache.
  6. return if !Rails.cache.is_a? ActiveSupport::Cache::FileStore
  7. Rails.cache.cleanup
  8. end
  9. end