gitlink-forgeplus/app/jobs/cache_async_clear_job.rb

15 lines
394 B
Ruby

class CacheAsyncClearJob < ApplicationJob
queue_as :cache
def perform(type, id=nil)
return if id.nil?
case type
when "project_common_service"
Cache::V2::ProjectCommonService.new(id).clear
when "owner_common_service"
Cache::V2::OwnnerCommonService.new(id).clear
when "project_rank_service"
Cache::V2::ProjectRankService.new(id).clear
end
end
end