Sha256: d74ac2166ca7e8cc0c30f9ca091ffac4f52a22dfa4b0eb0f6e23149cc009d77e
Contents?: true
Size: 489 Bytes
Versions: 32
Compression:
Stored size: 489 Bytes
Contents
module Cuboid module Support::Cache # @author Tasos "Zapotek" Laskos <tasos.laskos@gmail.com> class Preference < Base def prefer( &block ) @preference = block end private def store_with_internal_key( k, v ) prune if capped? && (size > max_size - 1) _store( k, v ) end def find_preference @preference.call end def prune preferred = find_preference delete( preferred ) if preferred end end end end
Version data entries
32 entries across 32 versions & 1 rubygems