Method: Sequel::Plugins::SubsetStaticCache::CachedDatasetMethods#with_pk
- Defined in:
- lib/sequel/plugins/subset_static_cache.rb
permalink #with_pk(pk) ⇒ Object
Return the frozen object with the given pk, or nil if no such object exists in the cache, without issuing a database query.
164 165 166 167 168 169 170 |
# File 'lib/sequel/plugins/subset_static_cache.rb', line 164 def with_pk(pk) if cache = @cache[:subset_static_cache_map] cache[pk] else super end end |