Class: Memoize::Storable

Inherits:
Object
  • Object
show all
Defined in:
lib/memoize.rb

Overview

Memoize::Storable class is abstract class. You must implement class which memoization data is saved. This module offer two storage class.

  • Memoize::MemoryStore -

  • Memoize::PStore - Persisten cache support.

Direct Known Subclasses

MemCacheStore, MemoryStore

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Storable

Returns a new instance of Storable.



25
26
27
# File 'lib/memoize.rb', line 25

def initialize(name)
  raise "Memoize::Strable don't instantiage for abstract class."
end

Instance Attribute Details

#storeObject

{{{



23
24
25
# File 'lib/memoize.rb', line 23

def store
  @store
end

Instance Method Details

#delete(key) ⇒ Object



38
39
# File 'lib/memoize.rb', line 38

def delete(key)
end

#delete_allObject



41
42
# File 'lib/memoize.rb', line 41

def delete_all
end

#get(key) ⇒ Object



32
33
# File 'lib/memoize.rb', line 32

def get(key)
end

#set(key, value) ⇒ Object



29
30
# File 'lib/memoize.rb', line 29

def set(key, value)
end

#update(key) ⇒ Object



35
36
# File 'lib/memoize.rb', line 35

def update(key)
end