Class: Optify::CacheInitOptions
- Inherits:
-
Object
- Object
- Optify::CacheInitOptions
- Defined in:
- lib/optify_ruby/cache_init_options.rb,
sig/optify.rbs
Overview
Options for initializing the cache.
Instance Attribute Summary collapse
-
#max_size ⇒ Object
readonly
: Integer?.
-
#mode ⇒ Object
readonly
A value from
CacheMode.
Instance Method Summary collapse
-
#initialize(max_size: nil, mode: CacheMode::NOT_THREAD_SAFE) ⇒ CacheInitOptions
constructor
A value from
CacheMode.
Constructor Details
#initialize ⇒ Integer? #initialize ⇒ Symbol #initialize(max_size:, mode:) ⇒ void
A value from CacheMode.
33 34 35 36 37 38 39 |
# File 'lib/optify_ruby/cache_init_options.rb', line 33 def initialize( max_size: nil, mode: CacheMode::NOT_THREAD_SAFE ) @max_size = max_size @mode = mode end |
Instance Attribute Details
#max_size ⇒ Object (readonly)
: Integer?
17 18 19 |
# File 'lib/optify_ruby/cache_init_options.rb', line 17 def max_size @max_size end |
#mode ⇒ Object (readonly)
A value from CacheMode.
: Symbol
22 23 24 |
# File 'lib/optify_ruby/cache_init_options.rb', line 22 def mode @mode end |