Class: RestrictCache::Cacheable::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/restrict_cache/cacheable/base.rb

Direct Known Subclasses

ActiveRecordCache, CustomCache

Instance Method Summary collapse

Constructor Details

#initializeBase

Returns a new instance of Base.



4
5
6
# File 'lib/restrict_cache/cacheable/base.rb', line 4

def initialize
  @caches = {}
end

Instance Method Details

#add(content) ⇒ Object

Raises:

  • (NotImplementedError)


8
9
10
# File 'lib/restrict_cache/cacheable/base.rb', line 8

def add(content)
  raise NotImplementedError
end

#contents(_table_name) ⇒ Object

Raises:

  • (NotImplementedError)


12
13
14
# File 'lib/restrict_cache/cacheable/base.rb', line 12

def contents(_table_name)
  raise NotImplementedError
end

#sizeObject



16
17
18
# File 'lib/restrict_cache/cacheable/base.rb', line 16

def size
  @caches.size
end