模块:Mongo::QueryCache::Middleware::ActiveJob

定义于:
lib/ Mongo/query_cache.rb

Overview

ActiveJob 中间件,为每个作业激活查询缓存。

类方法摘要折叠

类方法详细信息

。 included (base) ⇒对象



276
277
278
279
280
281
282
283
284
285
286
# File 'lib/ Mongo/query_cache.rb', line 276

def self.包含(基础)
  基础.class_eval do
    around_perform do |_job, 块|
      查询缓存.缓存 do
        块.调用
      end
    确保
      查询缓存.清除
    end
  end
end