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



166
167
168
# File 'lib/any_cache/adapters/basic.rb', line 166

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



137
138
139
# File 'lib/any_cache/adapters/basic.rb', line 137

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



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

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

#delete_matched(pattern, **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:

  • pattern (Regexp, String, Object)
  • options (Hash)

Raises:

  • (NotImplementedError)

Since:

  • 0.3.0



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

def delete_matched(pattern, **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



176
177
178
# File 'lib/any_cache/adapters/basic.rb', line 176

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



147
148
149
# File 'lib/any_cache/adapters/basic.rb', line 147

def expire(key, expires_in:)
  raise NotImplementedError
end

#fetch(key, **options, &fallback) ⇒ 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)
  • fallback (Proc)

Returns:

  • (Object)

Raises:

  • (NotImplementedError)

Since:

  • 0.2.0



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

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

#fetch_multi(*keys, **options, &fallback) ⇒ Hash

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:

  • keys (Array<String>)
  • options (Hash)
  • fallback (Proc)

Returns:

  • (Hash)

Raises:

  • (NotImplementedError)

Since:

  • 0.3.0



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

def fetch_multi(*keys, **options, &fallback)
  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



126
127
128
# File 'lib/any_cache/adapters/basic.rb', line 126

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



157
158
159
# File 'lib/any_cache/adapters/basic.rb', line 157

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

#read_multi(*keys, **options) ⇒ Hash

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:

  • keys (Array<String>)
  • options (Hash)

Returns:

  • (Hash)

Raises:

  • (NotImplementedError)

Since:

  • 0.3.0



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

def read_multi(*keys, **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



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

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

#write_multi(entries, **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:

  • entries (Hash)
  • options (Hash)

Raises:

  • (NotImplementedError)

Since:

  • 0.3.0



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

def write_multi(entries, **options)
  raise NotImplementedError
end