mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-02 19:30:48 +08:00
add: cache service
This commit is contained in:
16
app/jobs/cache_async_reset_job.rb
Normal file
16
app/jobs/cache_async_reset_job.rb
Normal file
@@ -0,0 +1,16 @@
|
||||
class CacheAsyncResetJob < ApplicationJob
|
||||
queue_as :cache
|
||||
|
||||
def perform(type, id, params={})
|
||||
case type
|
||||
when "owner_common_service"
|
||||
Cache::V2::OwnerCommonService.new(id).reset
|
||||
when "platform_statistic_service"
|
||||
Cache::V2::PlatformStatisticService.new.reset
|
||||
when "project_common_service"
|
||||
Cache::V2::ProjectCommonService.new(id).reset
|
||||
when "user_statistic_service"
|
||||
Cache::V2::PlatformStatisticService.new(id).reset
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user