Class: AdditionalTagsRemoveUnusedTagJob
- Inherits:
-
AdditionalTagsJob
- Object
- AdditionalsJob
- AdditionalTagsJob
- AdditionalTagsRemoveUnusedTagJob
- Defined in:
- app/jobs/additional_tags_remove_unused_tag_job.rb
Instance Method Summary collapse
Instance Method Details
#perform ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'app/jobs/additional_tags_remove_unused_tag_job.rb', line 4 def perform if Rails.env.test? # no cache for testing AdditionalTags::Tags. else # only once a minute to reduce load cache = ActiveSupport::Cache::MemoryStore.new expires_in: 1.minute cache.fetch self.class.to_s do AdditionalTags::Tags. true end end end |