Class: AnyCache::Adapters::Basic Private

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/any_cache/adapters/basic.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Since:

  • 0.1.0

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(driver) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

  • driver (Object)

Since:

  • 0.1.0



32
33
34
# File 'lib/any_cache/adapters/basic.rb', line 32

def initialize(driver)
  @driver = driver
end

Instance Attribute Details

#driverObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Object)

Since:

  • 0.1.0



25
26
27
# File 'lib/any_cache/adapters/basic.rb', line 25

def driver
  @driver
end

Class Method Details

.supported_driver?(driver) ⇒ Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

  • driver (Object)

Returns:

  • (Boolean)

Since:

  • 0.1.0



16
17
18
# File 'lib/any_cache/adapters/basic.rb', line 16

def supported_driver?(driver)
  false
end

Instance Method Details

#clear(**options) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This method returns an undefined value.

Parameters:

  • options (Hash)

Raises:

  • (NotImplementedError)

Since:

  • 0.1.0



114
115
116
# File 'lib/any_cache/adapters/basic.rb', line 114

def clear(**options)
  raise NotImplementedError
end

#decrement(key, value, **options) ⇒ Integer, Float

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

  • key (String)
  • value (Integer, Float)
  • options (Hash)

Returns:

  • (Integer, Float)

Raises:

  • (NotImplementedError)

Since:

  • 0.1.0



85
86
87
# File 'lib/any_cache/adapters/basic.rb', line 85

def decrement(key, value, **options)
  raise NotImplementedError
end

#delete(key, **options) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This method returns an undefined value.

Parameters:

  • key (String)
  • options (Hash)

Raises:

  • (NotImplementedError)

Since:

  • 0.1.0



63
64
65
# File 'lib/any_cache/adapters/basic.rb', line 63

def delete(key, **options)
  raise NotImplementedError
end

#exist?(key, **options) ⇒ Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

  • key (String)
  • options (Hash)

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)

Since:

  • 0.2.0



124
125
126
# File 'lib/any_cache/adapters/basic.rb', line 124

def exist?(key, **options)
  raise NotImplementedError
end

#expire(key, expires_in:) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This method returns an undefined value.

Parameters:

  • key (String)
  • expires_in (Hash)

    a customizable set of options

Options Hash (expires_in:):

  • (Integer)

Raises:

  • (NotImplementedError)

Since:

  • 0.1.0



95
96
97
# File 'lib/any_cache/adapters/basic.rb', line 95

def expire(key, expires_in:)
  raise NotImplementedError
end

#fetch(key, **options, &block) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

  • key (String)
  • options (Hash)

Returns:

  • (Object)

Raises:

  • (NotImplementedError)

Since:

  • 0.2.0



134
135
136
# File 'lib/any_cache/adapters/basic.rb', line 134

def fetch(key, **options, &block)
  raise NotImplementedError
end

#increment(key, value, **options) ⇒ Integer, Float

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

  • key (String)
  • value (Integer, Float)
  • options (Hash)

Returns:

  • (Integer, Float)

Raises:

  • (NotImplementedError)

Since:

  • 0.1.0



74
75
76
# File 'lib/any_cache/adapters/basic.rb', line 74

def increment(key, value, **options)
  raise NotImplementedError
end

#persist(key, **options) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This method returns an undefined value.

Parameters:

  • key (String)
  • options (Hash)

Raises:

  • (NotImplementedError)

Since:

  • 0.1.0



105
106
107
# File 'lib/any_cache/adapters/basic.rb', line 105

def persist(key, **options)
  raise NotImplementedError
end

#read(key, **options) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

  • key (String)
  • options (Hash)

Returns:

  • (Object)

Raises:

  • (NotImplementedError)

Since:

  • 0.1.0



42
43
44
# File 'lib/any_cache/adapters/basic.rb', line 42

def read(key, **options)
  raise NotImplementedError
end

#write(key, value, **options) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This method returns an undefined value.

Parameters:

  • key (String)
  • value (Object)
  • options (Hash)

Raises:

  • (NotImplementedError)

Since:

  • 0.1.0



53
54
55
# File 'lib/any_cache/adapters/basic.rb', line 53

def write(key, value, **options)
  raise NotImplementedError
end