Class: Juno::Adapters::LRUHash

Inherits:
Memory show all
Defined in:
lib/juno/adapters/lruhash.rb

Overview

LRUHash backend

Instance Method Summary collapse

Methods inherited from Memory

#clear, #delete, #key?, #load, #store

Methods inherited from Base

#[], #[]=, #close, #fetch

Constructor Details

#initialize(options = {}) ⇒ LRUHash

Constructor

Options:

  • :max_size - Maximum size of hash (default 1024)

Parameters:

  • options (Hash) (defaults to: {})


14
15
16
# File 'lib/juno/adapters/lruhash.rb', line 14

def initialize(options = {})
  @memory = Hashery::LRUHash.new(options[:max_size] || 1024)
end