lib/garcon/utility/memstash.rb
# Allows iteration over the items in the cache. Enumeration is stable: it
# is not affected by changes to the cache, including value expiration.
# Expired values are removed first.
#
# @note
#   The returned values could have expired by the time the client code gets
#   to accessing them.
#
# @note
#   Because of its stability, this operation is very expensive. Use with
#   caution.
#
# @yield [Array<key, value>]
#   Key/value pairs, when a block is provided.
#
# @return [Enumerator, Array<key, value>]
#   An Enumerator, when no block is provided, or array of key/value pairs.
#
Allows iteration over the items in the cache. Enumeration is stable: it
is not affected by changes to the cache, including value expiration.
Expired values are removed first.
Allows iteration over the items in the cache . Enumeration is stable : it is not affected by changes to the cache including value expiration . Expired values are removed first .
def each(&block)
      @monitor.synchronize do
        expire!
        @stash.map { |key, entry| [key, entry.value] }.each(&block)
      end
    end
def each ( & block ) @monitor . synchronize do expire! @stash . map { | key , entry | [ key , entry . value ] } . each ( & block ) end end
Allows iteration over the items in the cache.
Allows iteration over the items in the cache .
An Enumerator, when no block is provided, or array of key/value pairs.
An Enumerator when no block is provided or array of key / value pairs .
Enumerator, Array<key, value>
block
<not_specific>
]
<not_specific>
Key/value pairs, when a block is provided.
Key / value pairs when a block is provided .
note
The returned values could have expired by the time the client code gets to accessing them.
The returned values could have expired by the time the client code gets to accessing them .
note
Because of its stability, this operation is very expensive. Use with caution.
Because of its stability this operation is very expensive . Use with caution .