lib/garcon/utility/memstash.rb
# The maximum number of seconds an element can exist in the cache
# regardless of use. The element expires at this limit and will no longer
# be returned from the cache. The default value is 3600, or 1 hour. Setting
# A TTL value of 0 means no TTL eviction takes place (infinite lifetime).
The maximum number of seconds an element can exist in the cache
regardless of use. The element expires at this limit and will no longer
be returned from the cache. The default value is 3600, or 1 hour. Setting
A TTL value of 0 means no TTL eviction takes place (infinite lifetime).
The maximum number of seconds an element can exist in the cache regardless of use . The element expires at this limit and will no longer be returned from the cache . The default value is 3600 or 1 hour . Setting A TTL value of 0 means no TTL eviction takes place ( infinite lifetime ) .
def shrink_if_needed
      @monitor.synchronize do
        if @stash.length > @max_entries
          entry = delete(@stash.shift)
          @expires_at.delete(entry)
        end
      end
    end
def shrink_if_needed @monitor . synchronize do if @stash . length > @max_entries entry = delete ( @stash . shift ) @expires_at . delete ( entry ) end end end
The maximum number of seconds an element can exist in the cache
regardless of use.
The maximum number of seconds an element can exist in the cache regardless of use .