Class: IknowCache

Inherits:
Object
  • Object
show all
Defined in:
lib/iknow_cache.rb,
lib/iknow_cache/version.rb

Defined Under Namespace

Classes: Cache, CacheGroup

Constant Summary collapse

VERSION =
'1.1.1'

Class Method Summary collapse

Class Method Details

.merge_options(parent_options, options) ⇒ Object



242
243
244
245
246
247
248
249
250
# File 'lib/iknow_cache.rb', line 242

def self.merge_options(parent_options, options)
  if parent_options.blank?
    options
  elsif options.blank?
    parent_options
  else
    parent_options.merge(options)
  end
end

.register_group(name, key_name, default_options: nil, static_version: 1) {|group| ... } ⇒ Object

Yields:

  • (group)


4
5
6
7
8
# File 'lib/iknow_cache.rb', line 4

def self.register_group(name, key_name, default_options: nil, static_version: 1)
  group = CacheGroup.new(nil, name, key_name, default_options, static_version)
  yield group if block_given?
  group
end