Sha256: 4387cd94b831491f4fbf85b5e7c8e321455e558f6069ebd6d9f95c0e90dc9f41

Contents?: true

Size: 633 Bytes

Versions: 5

Compression:

Stored size: 633 Bytes

Contents

=begin
    Copyright 2010-2022 Ecsypno <http://www.ecsypno.com>

    This file is part of the Arachni Framework project and is subject to
    redistribution and commercial restrictions. Please see the Arachni Framework
    web site for more information on licensing and terms of use.
=end

module Arachni
module Support::Cache

# Random Replacement cache implementation.
#
# Discards entries at random in order to make room for new ones.
#
# @author Tasos "Zapotek" Laskos <tasos.laskos@arachni-scanner.com>
class RandomReplacement < Base

    private

    def prune
        @cache.delete( @cache.keys.sample )
    end

end

end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
arachni-1.6.1.3 lib/arachni/support/cache/random_replacement.rb
arachni-1.6.1.2 lib/arachni/support/cache/random_replacement.rb
arachni-1.6.1.1 lib/arachni/support/cache/random_replacement.rb
arachni-1.6.1 lib/arachni/support/cache/random_replacement.rb
arachni-1.6.0 lib/arachni/support/cache/random_replacement.rb