class Arachni::Support::Cache::LeastRecentlyUsed

Least Recently Used cache implementation.

Generally, the most desired mode under most circumstances. Discards the least recently used entries in order to make room for newer ones.

@author Tasos “Zapotek” Laskos <tasos.laskos@arachni-scanner.com>

Private Instance Methods

get_with_internal_key( k ) click to toggle source
# File lib/arachni/support/cache/least_recently_used.rb, line 22
def get_with_internal_key( k )
    return if !@cache.include? k
    renew( k )

    super k
end
renew( internal_key ) click to toggle source
# File lib/arachni/support/cache/least_recently_used.rb, line 29
def renew( internal_key )
    @cache[internal_key] = @cache.delete( internal_key )
end