Class: Cachew::Hash

Inherits:
Adapter show all
Defined in:
lib/cachew/hash.rb

Overview

In-memory cache adapter.

Constant Summary

Constants inherited from Adapter

Adapter::UNDEFINED

Instance Method Summary collapse

Methods inherited from Adapter

#fetch

Constructor Details

#initialize(store = {}) ⇒ Hash

Returns a new instance of Hash.

Parameters:

  • store (#to_hash) (defaults to: {})

    Underlying Hash used for storage



7
8
9
# File 'lib/cachew/hash.rb', line 7

def initialize(store = {})
  @store = store.to_hash
end