module Sequel::Plugins::StaticCache::ForbidLazyLoadClassMethods

Public Instance Methods

cache_get_pk(pk) click to toggle source

Do not forbid lazy loading for single object retrieval.

    # File lib/sequel/plugins/static_cache.rb
254 def cache_get_pk(pk)
255   primary_key_lookup(pk)
256 end
first(*args) { || ... } click to toggle source

Use static cache to return first arguments.

Calls superclass method
    # File lib/sequel/plugins/static_cache.rb
259 def first(*args)
260   if !defined?(yield) && args.empty?
261     if o = @all.first
262       _static_cache_frozen_copy(o)
263     end
264   else
265     super
266   end
267 end