def caching_jobs(&blk)
      _was_caching = caching_jobs?
      cache_jobs
      blk.call
      flush_jobs
      self.is_caching_jobs = _was_caching
      self
    end
def caching_jobs(&blk)
      _was_caching = caching_jobs?
      cache_jobs
      blk.call
      flush_jobs
      self.is_caching_jobs = _was_caching
      self
    end
Caches jobs for the duration of the block, flushes them at the end.