Sha256: 548e2c024cf85591bd52fb57cc03468fc0d0a44e7c07dce076e351a078c6c49d

Contents?: true

Size: 606 Bytes

Versions: 19

Compression:

Stored size: 606 Bytes

Contents

# frozen_string_literal: true

module IdentityCache
  module LoadStrategy
    module Eager
      extend self

      def load(cache_fetcher, db_key)
        yield CacheKeyLoader.load(cache_fetcher, db_key)
      end

      def load_multi(cache_fetcher, db_keys)
        yield CacheKeyLoader.load_multi(cache_fetcher, db_keys)
      end

      def load_batch(db_keys_by_cache_fetcher)
        yield CacheKeyLoader.load_batch(db_keys_by_cache_fetcher)
      end

      def lazy_load
        lazy_loader = Lazy.new
        yield lazy_loader
        lazy_loader.load_now
        nil
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
identity_cache-1.6.3 lib/identity_cache/load_strategy/eager.rb
identity_cache-1.6.2 lib/identity_cache/load_strategy/eager.rb
identity_cache-1.6.1 lib/identity_cache/load_strategy/eager.rb
identity_cache-1.6.0 lib/identity_cache/load_strategy/eager.rb
identity_cache-1.5.6 lib/identity_cache/load_strategy/eager.rb
identity_cache-1.5.5 lib/identity_cache/load_strategy/eager.rb
identity_cache-1.5.4 lib/identity_cache/load_strategy/eager.rb
identity_cache-1.5.3 lib/identity_cache/load_strategy/eager.rb
identity_cache-1.5.2 lib/identity_cache/load_strategy/eager.rb
identity_cache-1.5.1 lib/identity_cache/load_strategy/eager.rb
identity_cache-1.5.0 lib/identity_cache/load_strategy/eager.rb
identity_cache-1.4.1 lib/identity_cache/load_strategy/eager.rb
identity_cache-1.4.0 lib/identity_cache/load_strategy/eager.rb
identity_cache-1.3.1 lib/identity_cache/load_strategy/eager.rb
identity_cache-1.3.0 lib/identity_cache/load_strategy/eager.rb
identity_cache-1.2.0 lib/identity_cache/load_strategy/eager.rb
identity_cache-1.1.0 lib/identity_cache/load_strategy/eager.rb
identity_cache-1.0.1 lib/identity_cache/load_strategy/eager.rb
identity_cache-1.0.0 lib/identity_cache/load_strategy/eager.rb