Class: ConvenientService::Support::Cache::Entities::Caches::Base Private

Inherits:
Object
  • Object
show all
Includes:
AbstractMethod
Defined in:
lib/convenient_service/support/cache/entities/caches/base.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:

  • 1.0.0

Direct Known Subclasses

Array, Hash

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from AbstractMethod

abstract_method

Methods included from ConvenientService::Support::Concern

included

Constructor Details

#initialize(store: nil, default: nil, parent: nil, key: nil) ⇒ 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:

Since:

  • 1.0.0



110
111
112
113
114
115
# File 'lib/convenient_service/support/cache/entities/caches/base.rb', line 110

def initialize(store: nil, default: nil, parent: nil, key: nil)
  @store = store
  @default = default
  @parent = parent
  @key = key
end

Instance Attribute Details

#defaultObject (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.

Since:

  • 1.0.0



35
36
37
# File 'lib/convenient_service/support/cache/entities/caches/base.rb', line 35

def default
  @default
end

#keyObject (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.

Note:

key is only present when cache is scoped.

Since:

  • 1.0.0



51
52
53
# File 'lib/convenient_service/support/cache/entities/caches/base.rb', line 51

def key
  @key
end

#parentObject (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.

Note:

parent is only present when cache is scoped.

Since:

  • 1.0.0



43
44
45
# File 'lib/convenient_service/support/cache/entities/caches/base.rb', line 43

def parent
  @parent
end

#storeObject (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.

Since:

  • 1.0.0



29
30
31
# File 'lib/convenient_service/support/cache/entities/caches/base.rb', line 29

def store
  @store
end

Class Method Details

.keygenConvenientService::Support::Cache::Entities::Key

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.



20
21
22
# File 'lib/convenient_service/support/cache/entities/caches/base.rb', line 20

def keygen(...)
  Entities::Key.new(...)
end

Instance Method Details

#==(other) ⇒ 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:

  • other (Object)

    Can be any type.

Returns:

  • (Boolean, nil)

Since:

  • 1.0.0



168
169
170
171
172
173
174
# File 'lib/convenient_service/support/cache/entities/caches/base.rb', line 168

def ==(other)
  return unless other.instance_of?(self.class)

  return false if store != other.store

  true
end

#[]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.

Returns Can be any type.

Returns:

  • (Object)

    Can be any type.

Since:

  • 1.0.0



130
131
132
# File 'lib/convenient_service/support/cache/entities/caches/base.rb', line 130

def [](...)
  read(...)
end

#[]=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.

Returns Can be any type.

Returns:

  • (Object)

    Can be any type.

Since:

  • 1.0.0



150
151
152
# File 'lib/convenient_service/support/cache/entities/caches/base.rb', line 150

def []=(...)
  write(...)
end

#clearConvenientService::Support::Cache::Enitities::Caches::Base

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:

  • (ConvenientService::Support::Cache::Enitities::Caches::Base)

Since:

  • 1.0.0



86
# File 'lib/convenient_service/support/cache/entities/caches/base.rb', line 86

abstract_method :clear

#default=Object (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 Can be any type.

Returns:

  • (Object)

    Can be any type.

Since:

  • 1.0.0



101
# File 'lib/convenient_service/support/cache/entities/caches/base.rb', line 101

abstract_method :default=

#deleteObject?

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 Can be any type.

Returns:

  • (Object, nil)

    Can be any type.

Since:

  • 1.0.0



81
# File 'lib/convenient_service/support/cache/entities/caches/base.rb', line 81

abstract_method :delete

#empty?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.

Returns:

  • (Boolean)

Since:

  • 1.0.0



56
# File 'lib/convenient_service/support/cache/entities/caches/base.rb', line 56

abstract_method :empty?

#exist?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.

Returns:

  • (Boolean)

Since:

  • 1.0.0



61
# File 'lib/convenient_service/support/cache/entities/caches/base.rb', line 61

abstract_method :exist?

#fetchObject

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 Can be any type.

Returns:

  • (Object)

    Can be any type.

Since:

  • 1.0.0



76
# File 'lib/convenient_service/support/cache/entities/caches/base.rb', line 76

abstract_method :fetch

#getObject

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 Can be any type.

Returns:

  • (Object)

    Can be any type.

Since:

  • 1.0.0



140
141
142
# File 'lib/convenient_service/support/cache/entities/caches/base.rb', line 140

def get(...)
  read(...)
end

#keygenConvenientService::Support::Cache::Entities::Key

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.



120
121
122
# File 'lib/convenient_service/support/cache/entities/caches/base.rb', line 120

def keygen(...)
  self.class.keygen(...)
end

#readObject

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 Can be any type.

Returns:

  • (Object)

    Can be any type.

Since:

  • 1.0.0



66
# File 'lib/convenient_service/support/cache/entities/caches/base.rb', line 66

abstract_method :read

#scopeConvenientService::Support::Cache::Enitities::Caches::Base

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:

  • (ConvenientService::Support::Cache::Enitities::Caches::Base)

Since:

  • 1.0.0



91
# File 'lib/convenient_service/support/cache/entities/caches/base.rb', line 91

abstract_method :scope

#scope!ConvenientService::Support::Cache::Enitities::Caches::Base

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:

  • (ConvenientService::Support::Cache::Enitities::Caches::Base)

Since:

  • 1.0.0



96
# File 'lib/convenient_service/support/cache/entities/caches/base.rb', line 96

abstract_method :scope!

#setObject

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 Can be any type.

Returns:

  • (Object)

    Can be any type.

Since:

  • 1.0.0



160
161
162
# File 'lib/convenient_service/support/cache/entities/caches/base.rb', line 160

def set(...)
  write(...)
end

#writeObject

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 Can be any type.

Returns:

  • (Object)

    Can be any type.

Since:

  • 1.0.0



71
# File 'lib/convenient_service/support/cache/entities/caches/base.rb', line 71

abstract_method :write