impress/app/models/item/create_task.rb
Matchu 41fdcb5abc Remove newest_items caching from items page
Yeah I'm very unconvinced of the merit of saving us one items/translations query lmao
2023-10-23 19:05:04 -07:00

19 lines
No EOL
350 B
Ruby

class Item
class CreateTask
extend FragmentExpiration
TIMEOUT_IN_SECONDS = 10
@queue = :item_create
def self.perform(id)
Timeout::timeout(TIMEOUT_IN_SECONDS) do
expire_newest_items
end
end
def self.expire_newest_items
expire_fragment_in_all_locales('outfits#new newest_items')
end
end
end